public class GeneralXMLTools
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
DEFAULT_IMAGE_FORMAT |
static ObjectTokenizer |
Object_Tokenizer
读一般的Object对象时,采用节点的标记
|
static ObjectXMLWriterFinder |
Object_XML_Writer_Finder |
构造器和说明 |
---|
GeneralXMLTools() |
限定符和类型 | 方法和说明 |
---|---|
static java.awt.Image |
deprecatedDecodeImage(int width,
int height,
byte[] imageByteArray)
已过时。
这种所每个点的颜色记录下来的方式会导致图片很大
一张原始图片经过这个encode & decode的转化后再画jpg颜色会失真
Decode image.
|
static java.awt.Image |
deprecatedReadImage(XMLableReader reader)
已过时。
这种所每个点的颜色记录下来的方式会导致图片很大
一张原始图片经过这个encode & decode的转化后再画jpg颜色会失真
Decode image.
|
static java.lang.String |
elementValue(XMLableReader reader)
从输入源中获取节点名
|
static java.awt.Image |
imageDecode(byte[] bytes)
从byte数组中获取图片
|
static byte[] |
imageEncode(java.awt.Image image)
将图片转为byte数组, 默认使用png存储格式
|
static byte[] |
imageEncode(java.awt.Image image,
java.lang.String formatName)
将图片转为byte数组
|
static byte[] |
readByteArray(XMLableReader reader)
读取byte数组
|
static java.awt.Image |
readImage(XMLableReader reader)
从输入源中获取图片
|
static java.lang.Object |
readObject(XMLableReader reader)
读取一个对象到流
|
static java.lang.Object |
readObject(XMLableReader reader,
boolean isTrasferEqualStringToFormula)
读取一个对象到流
|
static XMLReadable |
readStringAsXMLable(java.lang.String xmlString)
以xml方式读string
|
static XMLReadable |
readStringAsXMLable(java.lang.String xmlString,
XMLReadable xmlable)
把xmlString里面属性读到xmlable里面,并把这个xmlable返回
|
static XMLable |
readXMLable(XMLableReader reader)
从输入源中读取xml
|
static void |
writeByteArray(XMLPrintWriter writer,
byte[] byteArray)
输出byte数组
|
static void |
writeImage(XMLPrintWriter writer,
java.awt.Image image)
输出图片
|
static void |
writeImage(XMLPrintWriter writer,
java.awt.Image image,
java.lang.String formatName)
输出图片
|
static void |
writeObject(XMLPrintWriter writer,
java.lang.Object object)
输出一个对象到流
|
static void |
writeObject(XMLPrintWriter writer,
java.lang.Object object,
java.lang.String tag)
输出一个对象到流
|
static void |
writeXMLable(XMLPrintWriter writer,
XMLable xml,
java.lang.String tagName)
写XMLable, 从ReportXMLUtils转过来的
|
static java.lang.String |
writeXMLableAsString(XMLWriter xmlable)
把一个XMLable写成字符串
|
public static ObjectTokenizer Object_Tokenizer
public static ObjectXMLWriterFinder Object_XML_Writer_Finder
public static final java.lang.String DEFAULT_IMAGE_FORMAT
public static java.lang.String writeXMLableAsString(XMLWriter xmlable)
xmlable
- xml文件public static XMLReadable readStringAsXMLable(java.lang.String xmlString, XMLReadable xmlable)
xmlString
- xml字符串xmlable
- xml文件public static XMLReadable readStringAsXMLable(java.lang.String xmlString)
xmlString
- xml字符串public static void writeXMLable(XMLPrintWriter writer, XMLable xml, java.lang.String tagName)
writer
- 输出源xml
- xml文件tagName
- 标签名public static XMLable readXMLable(XMLableReader reader)
reader
- 输入源public static java.lang.String elementValue(XMLableReader reader)
reader
- 输入源public static java.awt.Image readImage(XMLableReader reader)
reader
- 输入源public static byte[] imageEncode(java.awt.Image image)
image
- 图片public static byte[] imageEncode(java.awt.Image image, java.lang.String formatName)
image
- 图片formatName
- 图片序列化格式public static java.awt.Image imageDecode(byte[] bytes)
bytes
- 图片内容public static java.awt.Image deprecatedReadImage(XMLableReader reader)
reader
- 输入员public static java.awt.Image deprecatedDecodeImage(int width, int height, byte[] imageByteArray) throws java.lang.Exception
width
- 宽度height
- 高度imageByteArray
- 图片内容java.lang.Exception
public static byte[] readByteArray(XMLableReader reader)
reader
- 输入源public static void writeImage(XMLPrintWriter writer, java.awt.Image image)
writer
- 输出源image
- 需要输出的图片public static void writeImage(XMLPrintWriter writer, java.awt.Image image, java.lang.String formatName)
writer
- 输出源image
- 需要输出的图片formatName
- 图片格式public static void writeByteArray(XMLPrintWriter writer, byte[] byteArray)
writer
- 输出源byteArray
- 需要输出的数组public static java.lang.Object readObject(XMLableReader reader)
reader
- 输入源public static java.lang.Object readObject(XMLableReader reader, boolean isTrasferEqualStringToFormula)
reader
- 输入源isTrasferEqualStringToFormula
- 是否将以"="开头的String转换成Formula.这里是为了兼容, 3.0以前的版本常常把Formula保存为"="+string.public static void writeObject(XMLPrintWriter writer, java.lang.Object object, java.lang.String tag)
writer
- 输出源object
- 当前对象tag
- 标签名public static void writeObject(XMLPrintWriter writer, java.lang.Object object)
writer
- 输出源object
- 当前对象