Package org.bson
Class LazyBSONDecoder
-
- org.bson.LazyBSONDecoder
-
- All Implemented Interfaces:
BSONDecoder
- Direct Known Subclasses:
LazyDBDecoder
public class LazyBSONDecoder extends implements BSONDecoder
A decoder forLazyBSONObject
instances.
-
-
Constructor Summary
Constructors Constructor Description LazyBSONDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
decode(byte[] bytes, BSONCallback callback)
Decode a single BSON object into the given callback from the given byte array.int
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
in)
Read a single BSON object from the given input stream.
-
-
-
Method Detail
-
readObject
public BSONObject readObject(byte[] bytes)
Description copied from interface:BSONDecoder
Read a single BSON object from the given bytes.- Specified by:
readObject
in interfaceBSONDecoder
- Parameters:
bytes
- the bytes in BSON format- Returns:
- the BSON object for the given bytes
-
readObject
public in) throws
Description copied from interface:BSONDecoder
Read a single BSON object from the given input stream.- Specified by:
readObject
in interfaceBSONDecoder
- Parameters:
in
- the input stream in BSON format- Returns:
- the BSON object for the given bytes
- Throws:
- if there's a problem reading the object from the
InputStream
-
decode
public int decode(byte[] bytes, BSONCallback callback)
Description copied from interface:BSONDecoder
Decode a single BSON object into the given callback from the given byte array.- Specified by:
decode
in interfaceBSONDecoder
- Parameters:
bytes
- the bytes in BSON formatcallback
- the callback- Returns:
- the number of bytes in the BSON object
-
decode
public int decode( in, BSONCallback callback) throws
Description copied from interface:BSONDecoder
Decode a single BSON object into the given callback from the given input stream.- Specified by:
decode
in interfaceBSONDecoder
- Parameters:
in
- the input stream in BSON formatcallback
- the callback- Returns:
- the number of bytes read from the input stream
- Throws:
- if there's a problem reading from the
InputStream
-
-