public class XerCoder extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static byte |
ATTRIBUTE |
static byte |
CHILD_NODE |
static byte |
META |
static byte |
NODE_END |
static byte |
NODE_START |
static byte |
TYPE_BIGDECIMAL |
static byte |
TYPE_BIGINTEGER |
static byte |
TYPE_BOOLEAN |
static byte |
TYPE_BYTE |
static byte |
TYPE_BYTES |
static byte |
TYPE_CHAR |
static byte |
TYPE_DATE |
static byte |
TYPE_DOUBLE |
static byte |
TYPE_FLOAT |
static byte |
TYPE_INT |
static byte |
TYPE_LONG |
static byte |
TYPE_OBJECT |
static byte |
TYPE_SHORT |
static byte |
TYPE_STRING |
static byte |
VERSION |
| 构造器和说明 |
|---|
XerCoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
decode(Thing thing,
byte[] bytes,
int offset)
从字节流里构建数据对象。
|
static Thing |
decode(Thing thing,
InputStream input) |
static Thing |
decodeAttributeOnly(byte[] bytes,
int offset)
仅仅读取一个数据对象的属性。
|
static int |
decodeInt32(byte[] bytes) |
static long |
decodeLong64(byte[] bytes) |
static void |
encode(String name,
Object value,
String type,
OutputStream out) |
static void |
encode(Thing thing,
ByteBuffer buffer,
Map<Thing,String> context)
编码事物到字节缓存中。
|
static void |
encode(Thing thing,
OutputStream out,
Map<Thing,String> context) |
static void |
encode1(Thing thing,
OutputStream out,
Map<Thing,String> context)
编码事物到输出流中。
|
static void |
encodeAllx(Thing thing,
OutputStream out,
Map<Thing,String> context)
编码所有。
|
static byte[] |
encodeInt16(int value) |
static byte[] |
encodeInt32(int value) |
static byte[] |
encodeLong64(long value) |
static void |
encodeName(OutputStream out,
String name) |
static void |
encodeString(String str,
OutputStream out) |
public static final byte NODE_START
public static final byte NODE_END
public static final byte CHILD_NODE
public static final byte ATTRIBUTE
public static final byte VERSION
public static final byte META
public static final byte TYPE_STRING
public static final byte TYPE_BIGDECIMAL
public static final byte TYPE_BIGINTEGER
public static final byte TYPE_BOOLEAN
public static final byte TYPE_BYTE
public static final byte TYPE_BYTES
public static final byte TYPE_INT
public static final byte TYPE_DOUBLE
public static final byte TYPE_FLOAT
public static final byte TYPE_CHAR
public static final byte TYPE_SHORT
public static final byte TYPE_OBJECT
public static final byte TYPE_DATE
public static final byte TYPE_LONG
public static void encodeString(String str, OutputStream out) throws IOException
IOExceptionpublic static byte[] encodeInt16(int value)
public static void encode1(Thing thing, OutputStream out, Map<Thing,String> context) throws IOException
thing - 事物out - 输出流context - 上下文IOException - 异常public static void encode(Thing thing, OutputStream out, Map<Thing,String> context) throws IOException
IOExceptionpublic static void encodeAllx(Thing thing, OutputStream out, Map<Thing,String> context) throws IOException
thing - 事物out - 输出流context - 上下文IOException - 异常public static void encodeName(OutputStream out, String name) throws IOException
IOExceptionpublic static void encode(String name, Object value, String type, OutputStream out) throws IOException
IOExceptionpublic static Thing decode(Thing thing, InputStream input) throws IOException
IOExceptionpublic static int decode(Thing thing, byte[] bytes, int offset) throws IOException
thing - 事物bytes - 字节数组offset - 偏移IOException - 异常public static Thing decodeAttributeOnly(byte[] bytes, int offset) throws UnsupportedEncodingException
bytes - 字节数组offset - 偏移UnsupportedEncodingException - 异常public static byte[] encodeInt32(int value)
public static byte[] encodeLong64(long value)
public static int decodeInt32(byte[] bytes)
public static long decodeLong64(byte[] bytes)
public static void encode(Thing thing, ByteBuffer buffer, Map<Thing,String> context) throws IOException
thing - 事物buffer - 缓冲context - 上下文IOException - 异常Copyright © 2016 xworker.org. All rights reserved.