org.bson.io
Class BSONInput
java.lang.Object
org.bson.io.BSONInput
public class BSONInput
- extends Object
Field Summary |
protected int |
_len
|
protected int |
_max
|
protected int |
_pos
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_pos
protected int _pos
_len
protected int _len
_max
protected int _max
BSONInput
public BSONInput(InputStream in)
_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)