public class Schema extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(FieldInfo info)
添加一个字段
|
static Schema |
bytes2Me(byte[] buf,
String charset)
把字节流转化成自己
|
int |
fieldNum()
字段个数
|
FieldInfo |
find(int sn)
通过序号,查找字段
|
FieldInfo |
find(String name)
通过字段名,查找字段
|
FieldInfo |
get(int i)
得到第i个字段
|
String |
getAllNames() |
List<FieldInfo> |
getInfos()
得到所有的字段信息
|
FieldInfo |
getSeqFI() |
int |
getSortno()
得到排序字段的序号
|
int |
howManySequenceField() |
void |
setSortno(int sortno)
设置排序字段的序号
|
void |
setSortnoByName(String fieldname) |
ByteBuff |
toByteBuffer(String charset)
把自己转化成字节流,便于网络传输,网络传输的时候会自动调用。
|
String |
toString() |
public int fieldNum()
public void add(FieldInfo info)
info - public FieldInfo find(int sn)
sn - public FieldInfo get(int i)
i - public int getSortno()
public void setSortno(int sortno)
sortno - public FieldInfo getSeqFI()
public ByteBuff toByteBuffer(String charset) throws IOException
charset - -- 字符集IOExceptionpublic static Schema bytes2Me(byte[] buf, String charset) throws IOException
buf - -- 字节数组charset - -- 字符集IOExceptionpublic int howManySequenceField()
public String getAllNames()
Copyright © 2023. All rights reserved.