org.bson.io
Class BSONByteBuffer
java.lang.Object
org.bson.io.BSONByteBuffer
public class BSONByteBuffer
- extends Object
Pseudo byte buffer, delegates as it is too hard to properly override / extend the ByteBuffer API
- Author:
- brendan
buf
protected ByteBuffer buf
wrap
public static BSONByteBuffer wrap(byte[] bytes,
int offset,
int length)
wrap
public static BSONByteBuffer wrap(byte[] bytes)
get
public byte get(int i)
get
public ByteBuffer get(byte[] bytes,
int offset,
int length)
get
public ByteBuffer get(byte[] bytes)
array
public byte[] array()
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
getInt
public int getInt(int i)
- Gets a Little Endian Integer
- Parameters:
i
- Index to read from
- Returns:
getIntLE
public int getIntLE(int i)
getIntBE
public int getIntBE(int i)
getLong
public long getLong(int i)
getCString
public String getCString(int offset)
getUTF8String
public String getUTF8String(int valueOffset)
position
public Buffer position(int i)
reset
public Buffer reset()
size
public int size()