public class BsonBinary extends BsonValue
Constructor and Description |
---|
BsonBinary(BsonBinarySubType type,
byte[] data)
Construct a new instance with the given data and binary sub type.
|
BsonBinary(byte[] data)
Construct a new instance with the given data and the default sub-type
|
BsonBinary(byte type,
byte[] data)
Construct a new instance with the given data and binary sub type.
|
BsonBinary(java.util.UUID uuid)
Construct a Type 4 BsonBinary from the given UUID.
|
BsonBinary(java.util.UUID uuid,
UuidRepresentation uuidRepresentation)
Construct a new instance from the given UUID and UuidRepresentation
|
Modifier and Type | Method and Description |
---|---|
java.util.UUID |
asUuid()
Returns the binary as a UUID.
|
java.util.UUID |
asUuid(UuidRepresentation uuidRepresentation)
Returns the binary as a UUID.
|
boolean |
equals(java.lang.Object o) |
BsonType |
getBsonType()
Gets the BSON type of this value.
|
byte[] |
getData()
Gets the data of this Binary.
|
byte |
getType()
Gets the type of this Binary.
|
int |
hashCode() |
java.lang.String |
toString() |
asArray, asBinary, asBoolean, asDateTime, asDBPointer, asDecimal128, asDocument, asDouble, asInt32, asInt64, asJavaScript, asJavaScriptWithScope, asNumber, asObjectId, asRegularExpression, asString, asSymbol, asTimestamp, isArray, isBinary, isBoolean, isDateTime, isDBPointer, isDecimal128, isDocument, isDouble, isInt32, isInt64, isJavaScript, isJavaScriptWithScope, isNull, isNumber, isObjectId, isRegularExpression, isString, isSymbol, isTimestamp
public BsonBinary(byte[] data)
data
- the dataBsonBinarySubType.BINARY
public BsonBinary(BsonBinarySubType type, byte[] data)
data
- the datatype
- the binary sub typeBsonBinarySubType.BINARY
public BsonBinary(byte type, byte[] data)
data
- the datatype
- the binary sub typeBsonBinarySubType.BINARY
public BsonBinary(java.util.UUID uuid)
uuid
- the UUIDpublic BsonBinary(java.util.UUID uuid, UuidRepresentation uuidRepresentation)
uuid
- the UUIDuuidRepresentation
- the UUID representationpublic java.util.UUID asUuid()
public java.util.UUID asUuid(UuidRepresentation uuidRepresentation)
uuidRepresentation
- the UUID representationpublic BsonType getBsonType()
BsonValue
getBsonType
in class BsonValue
public byte getType()
public byte[] getData()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2023 Adobe. All Rights Reserved