org.bson.types
Class Binary

java.lang.Object
  extended by org.bson.types.Binary

public class Binary
extends Object

generic binary holder


Constructor Summary
Binary(byte[] data)
          Creates a Binary object with the default binary type of 0
Binary(byte type, byte[] data)
          Creates a Binary object
 
Method Summary
 byte[] getData()
           
 byte getType()
           
 int length()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Binary

public Binary(byte[] data)
Creates a Binary object with the default binary type of 0

Parameters:
data - raw data

Binary

public Binary(byte type,
              byte[] data)
Creates a Binary object

Parameters:
type - type of the field as encoded in BSON
data - raw data
Method Detail

getType

public byte getType()

getData

public byte[] getData()

length

public int length()