Package org.bson
Class LazyBSONDecoder
- java.lang.Object
 - 
- org.bson.LazyBSONDecoder
 
 
- 
- All Implemented Interfaces:
 BSONDecoder
- Direct Known Subclasses:
 LazyDBDecoder
public class LazyBSONDecoder extends java.lang.Object implements BSONDecoder
A decoder forLazyBSONObjectinstances. 
- 
- 
Constructor Summary
Constructors Constructor Description LazyBSONDecoder() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdecode(byte[] bytes, BSONCallback callback)Decode a single BSON object into the given callback from the given byte array.intdecode(java.io.InputStream in, BSONCallback callback)Decode a single BSON object into the given callback from the given input stream.BSONObjectreadObject(byte[] bytes)Read a single BSON object from the given bytes.BSONObjectreadObject(java.io.InputStream in)Read a single BSON object from the given input stream. 
 - 
 
- 
- 
Method Detail
- 
readObject
public BSONObject readObject(byte[] bytes)
Description copied from interface:BSONDecoderRead a single BSON object from the given bytes.- Specified by:
 readObjectin interfaceBSONDecoder- Parameters:
 bytes- the bytes in BSON format- Returns:
 - the BSON object for the given bytes
 
 
- 
readObject
public BSONObject readObject(java.io.InputStream in) throws java.io.IOException
Description copied from interface:BSONDecoderRead a single BSON object from the given input stream.- Specified by:
 readObjectin interfaceBSONDecoder- Parameters:
 in- the input stream in BSON format- Returns:
 - the BSON object for the given bytes
 - Throws:
 java.io.IOException- if there's a problem reading the object from theInputStream
 
- 
decode
public int decode(byte[] bytes, BSONCallback callback)Description copied from interface:BSONDecoderDecode a single BSON object into the given callback from the given byte array.- Specified by:
 decodein interfaceBSONDecoder- Parameters:
 bytes- the bytes in BSON formatcallback- the callback- Returns:
 - the number of bytes in the BSON object
 
 
- 
decode
public int decode(java.io.InputStream in, BSONCallback callback) throws java.io.IOExceptionDescription copied from interface:BSONDecoderDecode a single BSON object into the given callback from the given input stream.- Specified by:
 decodein interfaceBSONDecoder- Parameters:
 in- the input stream in BSON formatcallback- the callback- Returns:
 - the number of bytes read from the input stream
 - Throws:
 java.io.IOException- if there's a problem reading from theInputStream
 
 - 
 
 -