org.xworker.thingManagers.xer
类 XerCoder
java.lang.Object
org.xworker.thingManagers.xer.XerCoder
public class XerCoder
- extends java.lang.Object
|
方法摘要 |
static int |
decode(Thing thing,
byte[] bytes,
int offset)
从字节流里构建数据对象。 |
static Thing |
decode(Thing thing,
java.io.InputStream input)
|
static Thing |
decodeAttributeOnly(byte[] bytes,
int offset)
仅仅读取一个数据对象的属性。 |
static int |
decodeInt32(byte[] bytes)
|
static long |
decodeLong64(byte[] bytes)
|
static void |
encode(java.lang.String name,
java.lang.Object value,
java.lang.String type,
java.io.OutputStream out)
|
static void |
encode(Thing thing,
java.io.OutputStream out,
java.util.Map<Thing,java.lang.String> context)
|
static void |
encodeAll(Thing thing,
java.io.OutputStream out,
java.util.Map<Thing,java.lang.String> context)
编码所有。 |
static byte[] |
encodeInt32(int value)
|
static byte[] |
encodeLong64(long value)
|
static void |
encodeName(java.io.OutputStream out,
java.lang.String name)
|
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NODE_START
public static final byte NODE_START
- 另请参见:
- 常量字段值
NODE_END
public static final byte NODE_END
- 另请参见:
- 常量字段值
CHILD_NODE
public static final byte CHILD_NODE
- 另请参见:
- 常量字段值
ATTRIBUTE
public static final byte ATTRIBUTE
- 另请参见:
- 常量字段值
VERSION
public static final byte VERSION
- 另请参见:
- 常量字段值
TYPE_STRING
public static final byte TYPE_STRING
- 另请参见:
- 常量字段值
TYPE_BIGDECIMAL
public static final byte TYPE_BIGDECIMAL
- 另请参见:
- 常量字段值
TYPE_BIGINTEGER
public static final byte TYPE_BIGINTEGER
- 另请参见:
- 常量字段值
TYPE_BOOLEAN
public static final byte TYPE_BOOLEAN
- 另请参见:
- 常量字段值
TYPE_BYTE
public static final byte TYPE_BYTE
- 另请参见:
- 常量字段值
TYPE_BYTES
public static final byte TYPE_BYTES
- 另请参见:
- 常量字段值
TYPE_INT
public static final byte TYPE_INT
- 另请参见:
- 常量字段值
TYPE_DOUBLE
public static final byte TYPE_DOUBLE
- 另请参见:
- 常量字段值
TYPE_FLOAT
public static final byte TYPE_FLOAT
- 另请参见:
- 常量字段值
TYPE_CHAR
public static final byte TYPE_CHAR
- 另请参见:
- 常量字段值
TYPE_SHORT
public static final byte TYPE_SHORT
- 另请参见:
- 常量字段值
TYPE_OBJECT
public static final byte TYPE_OBJECT
- 另请参见:
- 常量字段值
TYPE_DATE
public static final byte TYPE_DATE
- 另请参见:
- 常量字段值
TYPE_LONG
public static final byte TYPE_LONG
- 另请参见:
- 常量字段值
XerCoder
public XerCoder()
encode
public static void encode(Thing thing,
java.io.OutputStream out,
java.util.Map<Thing,java.lang.String> context)
throws java.io.IOException
- 抛出:
java.io.IOException
encodeAll
public static void encodeAll(Thing thing,
java.io.OutputStream out,
java.util.Map<Thing,java.lang.String> context)
throws java.io.IOException
- 编码所有。
- 参数:
thing - out - context -
- 抛出:
java.io.IOException
encodeName
public static void encodeName(java.io.OutputStream out,
java.lang.String name)
throws java.io.IOException
- 抛出:
java.io.IOException
encode
public static void encode(java.lang.String name,
java.lang.Object value,
java.lang.String type,
java.io.OutputStream out)
throws java.io.IOException
- 抛出:
java.io.IOException
decode
public static Thing decode(Thing thing,
java.io.InputStream input)
throws java.io.IOException
- 抛出:
java.io.IOException
decode
public static int decode(Thing thing,
byte[] bytes,
int offset)
throws java.io.IOException
- 从字节流里构建数据对象。
- 参数:
thing - bytes - offset -
- 返回:
-
- 抛出:
java.io.IOException
decodeAttributeOnly
public static Thing decodeAttributeOnly(byte[] bytes,
int offset)
throws java.io.UnsupportedEncodingException
- 仅仅读取一个数据对象的属性。
- 参数:
bytes - offset -
- 返回:
-
- 抛出:
java.io.UnsupportedEncodingException
encodeInt32
public static byte[] encodeInt32(int value)
encodeLong64
public static byte[] encodeLong64(long value)
decodeInt32
public static int decodeInt32(byte[] bytes)
decodeLong64
public static long decodeLong64(byte[] bytes)