DBDecoder
, BSONDecoder
public class DefaultDBDecoder extends BasicBSONDecoder implements DBDecoder
Modifier and Type | Field | Description |
---|---|---|
static DBDecoderFactory |
FACTORY |
Constructor | Description |
---|---|
DefaultDBDecoder() |
Modifier and Type | Method | Description |
---|---|---|
DBObject |
decode(byte[] bytes,
DBCollection collection) |
Decode a single DBObject belonging to the given collection from the given array of bytes.
|
DBObject |
decode(InputStream input,
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() |
decode, decode, readObject, readObject
decode, decode, readObject, readObject
public static final DBDecoderFactory FACTORY
public DBCallback getDBCallback(DBCollection collection)
DBDecoder
getDBCallback
in interface DBDecoder
collection
- the collectionpublic DBObject decode(InputStream input, DBCollection collection) throws IOException
DBDecoder
decode
in interface DBDecoder
input
- the input streamcollection
- the collectionIOException
- may throw an exception while decoding from the InputStream
public DBObject decode(byte[] bytes, DBCollection collection)
DBDecoder