org.bson.io
Class BSONInput

java.lang.Object
  extended by org.bson.io.BSONInput

public class BSONInput
extends Object


Field Summary
protected  int _len
           
protected  int _max
           
protected  int _pos
           
 
Constructor Summary
BSONInput(InputStream in)
           
 
Method Summary
protected  boolean _isAscii(byte b)
           
protected  int _need(int num)
          ensure that there are num bytes to read _pos is where to start reading from
 void fill(byte[] b)
           
 void fill(byte[] b, int len)
           
 int getMax()
           
 int getPos()
           
 int numRead()
           
 byte read()
           
 String readCStr()
           
 double readDouble()
           
 int readInt()
           
 int readIntBE()
           
 long readLong()
           
 String readUTF8String()
           
 void setMax(int _max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_pos

protected int _pos

_len

protected int _len

_max

protected int _max
Constructor Detail

BSONInput

public BSONInput(InputStream in)
Method Detail

_need

protected int _need(int num)
             throws IOException
ensure that there are num bytes to read _pos is where to start reading from

Returns:
where to start reading from
Throws:
IOException

readInt

public int readInt()
            throws IOException
Throws:
IOException

readIntBE

public int readIntBE()
              throws IOException
Throws:
IOException

readLong

public long readLong()
              throws IOException
Throws:
IOException

readDouble

public double readDouble()
                  throws IOException
Throws:
IOException

read

public byte read()
          throws IOException
Throws:
IOException

fill

public void fill(byte[] b)
          throws IOException
Throws:
IOException

fill

public void fill(byte[] b,
                 int len)
          throws IOException
Throws:
IOException

_isAscii

protected boolean _isAscii(byte b)

readCStr

public String readCStr()
                throws IOException
Throws:
IOException

readUTF8String

public String readUTF8String()
                      throws IOException
Throws:
IOException

numRead

public int numRead()

getPos

public int getPos()

getMax

public int getMax()

setMax

public void setMax(int _max)