public class BsonReader extends Reader
详情见: http://www.redkale.org
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
position |
static byte |
SIGN_HASNEXT |
static byte |
SIGN_NONEXT |
static short |
SIGN_OBJECTB |
static short |
SIGN_OBJECTE |
protected byte |
typeval |
static byte |
VERBOSE_NO |
static byte |
VERBOSE_YES |
fieldIndex, SIGN_NOLENGTH, SIGN_NULL| 构造器和说明 |
|---|
BsonReader() |
BsonReader(byte[] bytes) |
BsonReader(byte[] bytes,
int start,
int len) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
static ObjectPool<BsonReader> |
createPool(int max) |
protected byte |
currentByte() |
boolean |
hasNext()
判断对象是否存在下一个属性或者数组是否存在下一个元素
|
int |
readArrayB()
判断下一个非空白字节是否为[
|
void |
readArrayE()
读取数组的尾端
|
void |
readBlank()
判断下一个非空白字节是否:
|
boolean |
readBoolean()
读取一个boolean值
|
byte |
readByte()
读取一个byte值
|
char |
readChar()
读取一个char值
|
java.lang.String |
readClassName()
读取反解析对象的类名
|
double |
readDouble()
读取一个double值
|
DeMember |
readFieldName(DeMember[] members)
根据字段读取字段对应的DeMember
|
float |
readFloat()
读取一个float值
|
int |
readInt()
读取一个int值
|
long |
readLong()
读取一个long值
|
int |
readMapB()
读取map的开头并返回map的size
|
void |
readMapE()
读取数组的尾端
|
java.lang.String |
readObjectB(java.lang.Class clazz)
读取对象的类名, 返回 null 表示对象为null, 返回空字符串表示当前class与返回的class一致,返回非空字符串表示class是当前class的子类。
|
void |
readObjectE(java.lang.Class clazz)
读取对象的尾端
|
short |
readShort()
读取一个short值
|
java.lang.String |
readSmallString()
读取无转义字符长度不超过255的字符串, 例如枚举值、字段名、类名字符串等
|
java.lang.String |
readString()
读取一个String值
|
protected boolean |
recycle() |
void |
setBytes(byte[] bytes) |
void |
setBytes(byte[] bytes,
int start,
int len) |
void |
skipValue()
跳过属性的值
|
public static final short SIGN_OBJECTB
public static final short SIGN_OBJECTE
public static final byte SIGN_HASNEXT
public static final byte SIGN_NONEXT
public static final byte VERBOSE_NO
public static final byte VERBOSE_YES
protected byte typeval
protected int position
public BsonReader()
public BsonReader(byte[] bytes)
public BsonReader(byte[] bytes,
int start,
int len)
public static ObjectPool<BsonReader> createPool(int max)
public final void setBytes(byte[] bytes)
public final void setBytes(byte[] bytes,
int start,
int len)
protected boolean recycle()
public void close()
public final java.lang.String readObjectB(java.lang.Class clazz)
ReaderreadObjectB 在类中 Readerclazz - 类名public final void readObjectE(java.lang.Class clazz)
ReaderreadObjectE 在类中 Readerclazz - 类名protected byte currentByte()
public final int readMapB()
Readerpublic int readArrayB()
readArrayB 在类中 Readerpublic final void readArrayE()
ReaderreadArrayE 在类中 Readerpublic final DeMember readFieldName(DeMember[] members)
ReaderreadFieldName 在类中 Readermembers - DeMember的全量集合public boolean readBoolean()
ReaderreadBoolean 在类中 Readerpublic final float readFloat()
Readerpublic final double readDouble()
ReaderreadDouble 在类中 Readerpublic final java.lang.String readClassName()
ReaderreadClassName 在类中 Readerpublic java.lang.String readSmallString()
ReaderreadSmallString 在类中 Readerpublic java.lang.String readString()
ReaderreadString 在类中 Reader