convert
This commit is contained in:
@@ -24,11 +24,11 @@ public class BsonByteBufferReader extends BsonReader {
|
||||
|
||||
private ByteBuffer currentBuffer;
|
||||
|
||||
protected BsonByteBufferReader() {}
|
||||
|
||||
protected BsonByteBufferReader(ByteBuffer... buffers) {
|
||||
this.buffers = buffers;
|
||||
if (buffers != null && buffers.length > 0) {
|
||||
this.currentBuffer = buffers[currentIndex];
|
||||
}
|
||||
this.currentBuffer = buffers[currentIndex];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ProtobufByteBufferReader extends ProtobufReader {
|
||||
|
||||
@Override
|
||||
public final boolean readBoolean() {
|
||||
return nextByte() != 0;
|
||||
return nextByte() == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -175,7 +175,7 @@ public class ProtobufReader extends Reader {
|
||||
// ------------------------------------------------------------
|
||||
@Override
|
||||
public boolean readBoolean() {
|
||||
return content[++this.position] != 0;
|
||||
return content[++this.position] == 1;
|
||||
}
|
||||
|
||||
public final boolean[] readBools() {
|
||||
|
||||
Reference in New Issue
Block a user