This commit is contained in:
地平线
2015-07-02 12:05:57 +08:00
parent 44879091d6
commit 0f0ec56499
3 changed files with 3 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ import java.lang.reflect.*;
* 1). 基本数据类型: 直接转换成byte[] * 1). 基本数据类型: 直接转换成byte[]
* 2). SmallString(无特殊字符且长度小于256的字符串): length(1 byte) + byte[](utf8); 通常用于类名、字段名、枚举。 * 2). SmallString(无特殊字符且长度小于256的字符串): length(1 byte) + byte[](utf8); 通常用于类名、字段名、枚举。
* 3). String: length(4 bytes) + byte[](utf8); * 3). String: length(4 bytes) + byte[](utf8);
* 4). 数组(长度不能大于65535): length(2 byte) + byte[]... * 4). 数组: length(4 bytes) + byte[]...
* 5). Object: * 5). Object:
* 1. realclass (SmallString) (如果指定格式化的class与实体对象的class不一致才会有该值) * 1. realclass (SmallString) (如果指定格式化的class与实体对象的class不一致才会有该值)
* 2. 空字符串(SmallString) * 2. 空字符串(SmallString)

View File

@@ -170,7 +170,7 @@ public final class BsonReader implements Reader {
*/ */
@Override @Override
public int readArrayB() { public int readArrayB() {
return readShort() & 0xffff; return readInt();
} }
@Override @Override

View File

@@ -256,7 +256,7 @@ public final class BsonWriter implements Writer {
@Override @Override
public void writeArrayB(int size) { public void writeArrayB(int size) {
writeShort((short) size); writeInt(size);
} }
@Override @Override