public class JsonThingCoder extends Object implements ThingCoder
| 构造器和说明 |
|---|
JsonThingCoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
decode(Thing thing,
InputStream in,
long lastModifyed)
解码一个输入流到事物中。
|
void |
decode(Thing thing,
String thingName,
Object value,
Map<String,String> imports,
long lastModifyed,
boolean decodeIndex) |
void |
decodeIndex(ThingIndex thingIndex,
InputStream in,
long lastModifyed)
只解码用于索引事物的部分,事物索引通常用于UI的导航中。
|
void |
encode(Thing thing,
OutputStream out)
编码一个事物到输出流中。
|
String |
getType()
返回编码器的类型,通常是文件的后缀名。
|
String |
importToNormalString(String str,
Map<String,String> imports) |
public void encode(Thing thing, OutputStream out)
ThingCoderencode 在接口中 ThingCoderthing - 事物out - 输出流public void decode(Thing thing, InputStream in, long lastModifyed)
ThingCoderdecode 在接口中 ThingCoderthing - 事物in - 输入流lastModifyed - 如果为0表示解码时不能获取时间,可能需要在格式中去解public void decode(Thing thing, String thingName, Object value, Map<String,String> imports, long lastModifyed, boolean decodeIndex)
public void decodeIndex(ThingIndex thingIndex, InputStream in, long lastModifyed)
ThingCoderdecodeIndex 在接口中 ThingCoderthingIndex - 事物索引in - 输入流lastModifyed - 如果为0表示解码时不能获取时间,可能需要在格式中去解public String getType()
ThingCodergetType 在接口中 ThingCoderCopyright © 2016 xworker.org. All rights reserved.