This commit is contained in:
地平线
2015-11-03 12:11:51 +08:00
parent 97ac672f75
commit d179653bed

View File

@@ -54,10 +54,14 @@ public final class BsonReader implements Reader {
} }
public final void setBytes(byte[] bytes, int start, int len) { public final void setBytes(byte[] bytes, int start, int len) {
if (bytes == null) {
this.position = 0;
} else {
this.content = bytes; this.content = bytes;
this.position = start - 1; this.position = start - 1;
//this.limit = start + len - 1; //this.limit = start + len - 1;
} }
}
protected boolean recycle() { protected boolean recycle() {
this.position = -1; this.position = -1;