public class DefaultDBDecoder extends BasicBSONDecoder implements DBDecoder
BasicBSONDecoder.BSONInput
Modifier and Type | Field and Description |
---|---|
static DBDecoderFactory |
FACTORY |
_callback, _in, _len, _pos
Constructor and Description |
---|
DefaultDBDecoder() |
Modifier and Type | Method and Description |
---|---|
DBObject |
decode(byte[] b,
DBCollection collection)
Decode a single DBObject belonging to the given collection from the given array of bytes.
|
DBObject |
decode(InputStream in,
DBCollection collection)
Decode a single DBObject belonging to the given collection from the given input stream.
|
DBCallback |
getDBCallback(DBCollection collection)
Get a callback for the given collection.
|
String |
toString() |
_binary, decode, decode, readObject, readObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
decode, decode, readObject, readObject
public static DBDecoderFactory FACTORY
public DBCallback getDBCallback(DBCollection collection)
DBDecoder
getDBCallback
in interface DBDecoder
collection
- the collectionpublic DBObject decode(byte[] b, DBCollection collection)
DBDecoder
public DBObject decode(InputStream in, DBCollection collection) throws IOException
DBDecoder
decode
in interface DBDecoder
in
- the input streamcollection
- the collectionIOException
- may throw an exception while decoding from the InputStream