org.bson.types
Class Binary
java.lang.Object
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 BSONdata
- raw data
getType
public byte getType()
getData
public byte[] getData()
length
public int length()