org.bson.types
Class Binary
java.lang.Object
org.bson.types.Binary
- All Implemented Interfaces:
- Serializable
public class Binary
- extends Object
- implements Serializable
generic binary holder
- See Also:
- Serialized Form
|
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 |
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()
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object