| Constructor and Description |
|---|
ByteBufferBsonInput(ByteBuf buffer)
Construct an instance with the given byte buffer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
BsonInputMark |
getMark(int readLimit)
Gets a mark for the current position in the stream.
|
int |
getPosition()
Gets the current position in the stream
|
boolean |
hasRemaining()
Returns true if there are more bytes left in the stream.
|
void |
mark(int readLimit)
Deprecated.
|
byte |
readByte()
Reads a single byte from the stream
|
void |
readBytes(byte[] bytes)
Reads the specified number of bytes into the given byte array.
|
void |
readBytes(byte[] bytes,
int offset,
int length)
Reads the specified number of bytes into the given byte array starting at the specified offset.
|
java.lang.String |
readCString()
Reads a BSON CString value from the stream.
|
double |
readDouble()
Reads a BSON Double value from the stream.
|
int |
readInt32()
Reads a BSON Int32 value from the stream.
|
long |
readInt64()
Reads a BSON Int64 value from the stream.
|
ObjectId |
readObjectId()
Reads a BSON ObjectId value from the stream.
|
java.lang.String |
readString()
Reads a BSON String value from the stream.
|
void |
reset()
Deprecated.
|
void |
skip(int numBytes)
Skips the specified number of bytes in the stream.
|
void |
skipCString()
Skips a BSON CString value from the stream.
|
public ByteBufferBsonInput(ByteBuf buffer)
buffer - the byte bufferpublic int getPosition()
BsonInputgetPosition in interface BsonInputpublic byte readByte()
BsonInputpublic void readBytes(byte[] bytes)
BsonInputreadBytes(bytes, 0, bytes.length).public void readBytes(byte[] bytes,
int offset,
int length)
BsonInputpublic long readInt64()
BsonInputpublic double readDouble()
BsonInputreadDouble in interface BsonInputpublic int readInt32()
BsonInputpublic ObjectId readObjectId()
BsonInputreadObjectId in interface BsonInputpublic java.lang.String readString()
BsonInputreadString in interface BsonInputpublic java.lang.String readCString()
BsonInputreadCString in interface BsonInputpublic void skipCString()
BsonInputskipCString in interface BsonInputpublic void skip(int numBytes)
BsonInput@Deprecated public void mark(int readLimit)
BsonInputInputStream.public BsonInputMark getMark(int readLimit)
BsonInput@Deprecated public void reset()
BsonInputInputStream.public boolean hasRemaining()
BsonInputhasRemaining in interface BsonInputCopyright © 2010 - 2023 Adobe. All Rights Reserved