public class BinaryValue extends AbstractValue<byte[]>
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Used for serialization
|
attributeType, h, LOG, normalizedValue, upValue| Constructor and Description |
|---|
BinaryValue(AttributeType attributeType,
byte[] value)
Creates a BinaryValue with an initial user provided binary value.
|
BinaryValue(byte[] value)
Creates a BinaryValue with an initial user provided binary value.
|
| Modifier and Type | Method and Description |
|---|---|
BinaryValue |
clone()
Clone a Value
|
int |
compareTo(Value<byte[]> value) |
static BinaryValue |
deserialize(AttributeType attributeType,
ObjectInput in)
Deserialize a schema aware BinaryValue.
|
static BinaryValue |
deserialize(ObjectInput in)
Deserialize a BinaryValue.
|
boolean |
equals(Object obj)
Checks to see if this BinaryValue equals the supplied object.
|
byte[] |
getBytes()
Get the user provided value as a byte[].
|
byte[] |
getNormValue()
Gets a direct reference to the normalized representation for the
user provided value of this ServerValue wrapper.
|
String |
getString()
Get the user provided value as a String.
|
byte[] |
getValue()
Get the User Provided value.
|
int |
hashCode() |
boolean |
isHumanReadable()
Tells if the current value is Human Readable
|
int |
length() |
void |
readExternal(ObjectInput in) |
String |
toString()
Dumps binary in hex with label.
|
void |
writeExternal(ObjectOutput out) |
apply, getAttributeType, getLdapComparator, getNormReference, getReference, isInstanceOf, isNull, isSchemaAware, isValidpublic static final long serialVersionUID
public BinaryValue(byte[] value)
value - the binary value to wrap which may be null, or a zero length byte arraypublic BinaryValue(AttributeType attributeType, byte[] value) throws LdapInvalidAttributeValueException
attributeType - the schema type associated with this BinaryValuevalue - the binary value to wrap which may be null, or a zero length byte arrayLdapInvalidAttributeValueException - If the added value is invalid accordingly
to the schemapublic byte[] getNormValue()
public int compareTo(Value<byte[]> value)
ServerValue#compareTo(Value)public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
public BinaryValue clone()
clone in interface Value<byte[]>clone in class AbstractValue<byte[]>public byte[] getValue()
public boolean isHumanReadable()
true if the value is HR, false otherwisepublic int length()
public byte[] getBytes()
getBytes in interface Value<byte[]>getBytes in class AbstractValue<byte[]>public String getString()
getString in interface Value<byte[]>getString in class AbstractValue<byte[]>public static BinaryValue deserialize(ObjectInput in) throws IOException, ClassNotFoundException
attributeType - The AttributeType associated with the Value. Can be nullin - The input streamIOException - If the stream can't be readClassNotFoundException - If we can't instanciate a BinaryValuepublic static BinaryValue deserialize(AttributeType attributeType, ObjectInput in) throws IOException, ClassNotFoundException
attributeType - The AttributeType associated with the Value. Can be nullin - The input streamIOException - If the stream can't be readClassNotFoundException - If we can't instanciate a BinaryValuepublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
IOExceptionpublic String toString()
toString in class ObjectObject.toString()Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.