org.bson
Class BasicBSONDecoder

java.lang.Object
  extended by org.bson.BasicBSONDecoder
All Implemented Interfaces:
BSONDecoder
Direct Known Subclasses:
DefaultDBDecoder

public class BasicBSONDecoder
extends java.lang.Object
implements BSONDecoder

Basic implementation of BSONDecoder interface that creates BasicBSONObject instances


Nested Class Summary
protected  class BasicBSONDecoder.Input
           
 
Field Summary
protected  BSONCallback _callback
           
protected  BasicBSONDecoder.Input _in
           
 
Constructor Summary
BasicBSONDecoder()
           
 
Method Summary
protected  void _binary(java.lang.String name)
           
 int decode(byte[] b, BSONCallback callback)
           
 int decode(java.io.InputStream in, BSONCallback callback)
           
 BSONObject readObject(byte[] b)
           
 BSONObject readObject(java.io.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.Input _in

_callback

protected BSONCallback _callback
Constructor Detail

BasicBSONDecoder

public BasicBSONDecoder()
Method Detail

readObject

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

readObject

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

decode

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

decode

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

_binary

protected void _binary(java.lang.String name)
                throws java.io.IOException
Throws:
java.io.IOException