public class

BSONByteBuffer

extends Object
java.lang.Object
   ↳ org.bson.io.BSONByteBuffer

Class Overview

Pseudo byte buffer, delegates as it is too hard to properly override / extend the ByteBuffer API

Summary

Fields
protected ByteBuffer buf
Public Methods
byte[] array()
boolean equals(Object o)
byte get(int i)
ByteBuffer get(byte[] bytes, int offset, int length)
ByteBuffer get(byte[] bytes)
String getCString(int offset)
int getInt(int i)
Gets a Little Endian Integer
int getIntBE(int i)
int getIntLE(int i)
long getLong(int i)
String getUTF8String(int valueOffset)
int hashCode()
Buffer position(int i)
Buffer reset()
int size()
String toString()
static BSONByteBuffer wrap(byte[] bytes)
static BSONByteBuffer wrap(byte[] bytes, int offset, int length)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected ByteBuffer buf

Public Methods

public byte[] array ()

public boolean equals (Object o)

public byte get (int i)

public ByteBuffer get (byte[] bytes, int offset, int length)

public ByteBuffer get (byte[] bytes)

public String getCString (int offset)

public int getInt (int i)

Gets a Little Endian Integer

Parameters
i Index to read from

public int getIntBE (int i)

public int getIntLE (int i)

public long getLong (int i)

public String getUTF8String (int valueOffset)

public int hashCode ()

public Buffer position (int i)

public Buffer reset ()

public int size ()

public String toString ()

public static BSONByteBuffer wrap (byte[] bytes)

public static BSONByteBuffer wrap (byte[] bytes, int offset, int length)