public class XmlThingCoder extends Object implements ThingCoder
| 构造器和说明 |
|---|
XmlThingCoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
acceptType(String type)
是否是制定类型的编码者。
|
void |
decode(Thing thing,
InputStream in,
long lastModified)
解码一个输入流到事物中。
|
void |
decodeIndex(ThingIndex thingIndex,
InputStream in,
long lastModified)
只解码用于索引事物的部分,事物索引通常用于UI的导航中。
|
void |
encode(Thing thing,
OutputStream out)
编码一个事物到输出流中。
|
String[] |
getCodeTypes()
返回编码器所支持的所有类型。
|
String |
getType()
返回编码器的类型,通常是文件的后缀名。
|
public static String TYPE
public void decode(Thing thing, InputStream in, long lastModified)
ThingCoderdecode 在接口中 ThingCoderthing - 事物in - 输入流lastModified - 如果为0表示解码时不能获取时间,可能需要在格式中去解public void decodeIndex(ThingIndex thingIndex, InputStream in, long lastModified)
ThingCoderdecodeIndex 在接口中 ThingCoderthingIndex - 事物索引in - 输入流lastModified - 如果为0表示解码时不能获取时间,可能需要在格式中去解public void encode(Thing thing, OutputStream out)
ThingCoderencode 在接口中 ThingCoderthing - 事物out - 输出流public String getType()
ThingCodergetType 在接口中 ThingCoderpublic boolean acceptType(String type)
ThingCoderacceptType 在接口中 ThingCodertype - 类型public String[] getCodeTypes()
ThingCodergetCodeTypes 在接口中 ThingCoderCopyright © 2016 xworker.org. All rights reserved.