程序包 org.xmeta
接口 ThingCoder
- 所有已知实现类:
DmlThingCoder,DmwThingCoder,JsonThingCoder,PropertyThingCoder,TxtThingCoder,XerThingCoder,XmlThingCoder
public interface ThingCoder
模型编码器。
- 作者:
- zyx
-
字段概要
字段 -
方法概要
修饰符和类型方法说明booleanacceptType(String type) 是否是制定类型的编码者。voiddecode(Thing thing, InputStream in, long lastModifyed) 解码一个输入流到模型中。voiddecodeIndex(ThingIndex thingIndex, InputStream in, long lastModifyed) 只解码用于索引模型的部分,模型索引通常用于UI的导航中。voidencode(Thing thing, OutputStream out) 编码一个模型到输出流中。String[]返回编码器所支持的所有类型。getType()返回编码器的类型,通常是文件的后缀名。
-
字段详细资料
-
方法详细资料
-
encode
编码一个模型到输出流中。- 参数:
thing- 模型out- 输出流
-
decode
解码一个输入流到模型中。- 参数:
thing- 模型in- 输入流lastModifyed- 如果为0表示解码时不能获取时间,可能需要在格式中去解
-
decodeIndex
只解码用于索引模型的部分,模型索引通常用于UI的导航中。- 参数:
thingIndex- 模型索引in- 输入流lastModifyed- 如果为0表示解码时不能获取时间,可能需要在格式中去解
-
getType
String getType()返回编码器的类型,通常是文件的后缀名。- 返回:
- 类型
-
getCodeTypes
String[] getCodeTypes()返回编码器所支持的所有类型。- 返回:
- 编码器所支持的所有类型。
-
acceptType
是否是制定类型的编码者。- 参数:
type- 类型- 返回:
- 如果是返回ture,否则返回false
-