org.bson
Class BasicBSONDecoder

java.lang.Object
  extended by org.bson.BasicBSONDecoder
All Implemented Interfaces:
BSONDecoder

public class BasicBSONDecoder
extends Object
implements BSONDecoder

Basic implementation of BSONDecoder interface that creates BasicBSONObject instances


Nested Class Summary
protected  class BasicBSONDecoder.BSONInput
           
 
Field Summary
protected  BSONCallback _callback
           
protected  BasicBSONDecoder.BSONInput _in
           
protected  int _len
           
protected  int _pos
           
 
Constructor Summary
BasicBSONDecoder()
           
 
Method Summary
protected  void _binary(String name)
           
 int decode(byte[] b, BSONCallback callback)
           
 int decode(InputStream in, BSONCallback callback)
           
 BSONObject readObject(byte[] b)
           
 BSONObject readObject(InputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_in

protected BasicBSONDecoder.BSONInput _in

_callback

protected BSONCallback _callback

_pos

protected int _pos

_len

protected int _len
Constructor Detail

BasicBSONDecoder

public BasicBSONDecoder()
Method Detail

readObject

public BSONObject readObject(byte[] b)
Specified by:
readObject in interface BSONDecoder

readObject

public BSONObject readObject(InputStream in)
                      throws IOException
Specified by:
readObject in interface BSONDecoder
Throws:
IOException

decode

public int decode(byte[] b,
                  BSONCallback callback)
Specified by:
decode in interface BSONDecoder

decode

public int decode(InputStream in,
                  BSONCallback callback)
           throws IOException
Specified by:
decode in interface BSONDecoder
Throws:
IOException

_binary

protected void _binary(String name)
                throws IOException
Throws:
IOException