Package org.bson.types
Class Binary
- java.lang.Object
-
- org.bson.types.Binary
-
- All Implemented Interfaces:
java.io.Serializable
@Deprecated(since="2022-10-31") public class Binary extends java.lang.Object implements java.io.Serializable
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.Generic binary holder.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Binary(byte[] data)
Deprecated.Creates a Binary object with the default binary type of 0Binary(byte type, byte[] data)
Deprecated.Creates a Binary objectBinary(BsonBinarySubType type, byte[] data)
Deprecated.Creates a Binary with the specified type and data.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Deprecated.byte[]
getData()
Deprecated.Get a copy of the binary value.byte
getType()
Deprecated.Get the binary sub type as a byte.int
hashCode()
Deprecated.int
length()
Deprecated.Get the length of the data.
-
-
-
Constructor Detail
-
Binary
public Binary(byte[] data)
Deprecated.Creates a Binary object with the default binary type of 0- Parameters:
data
- raw data
-
Binary
public Binary(BsonBinarySubType type, byte[] data)
Deprecated.Creates a Binary with the specified type and data.- Parameters:
type
- the binary typedata
- the binary data
-
Binary
public Binary(byte type, byte[] data)
Deprecated.Creates a Binary object- Parameters:
type
- type of the field as encoded in BSONdata
- raw data
-
-
Method Detail
-
getType
public byte getType()
Deprecated.Get the binary sub type as a byte.- Returns:
- the binary sub type as a byte.
-
getData
public byte[] getData()
Deprecated.Get a copy of the binary value.- Returns:
- a copy of the binary value.
-
length
public int length()
Deprecated.Get the length of the data.- Returns:
- the length of the binary array.
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
-