public class BasicBSONDecoder extends Object implements BSONDecoder
Constructor and Description |
---|
BasicBSONDecoder() |
Modifier and Type | Method and Description |
---|---|
int |
decode(byte[] bytes,
BSONCallback callback)
Decode a single BSON object into the given callback from the given byte array.
|
int |
decode(InputStream in,
BSONCallback callback)
Decode a single BSON object into the given callback from the given input stream.
|
BSONObject |
readObject(byte[] bytes)
Read a single BSON object from the given bytes.
|
BSONObject |
readObject(InputStream in)
Read a single BSON object from the given input stream.
|
public BSONObject readObject(byte[] bytes)
BSONDecoder
readObject
in interface BSONDecoder
bytes
- the bytes in BSON formatpublic BSONObject readObject(InputStream in) throws IOException
BSONDecoder
readObject
in interface BSONDecoder
in
- the input stream in BSON formatIOException
- if there's a problem reading the object from the InputStream
public int decode(byte[] bytes, BSONCallback callback)
BSONDecoder
decode
in interface BSONDecoder
bytes
- the bytes in BSON formatcallback
- the callbackpublic int decode(InputStream in, BSONCallback callback) throws IOException
BSONDecoder
decode
in interface BSONDecoder
in
- the input stream in BSON formatcallback
- the callbackIOException
- if there's a problem reading from the InputStream