|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.entry.AbstractValue<byte[]>
org.apache.directory.api.ldap.model.entry.BinaryValue
public class BinaryValue
A server side schema aware wrapper around a binary attribute value. This value wrapper uses schema information to syntax check values, and to compare them for equality and ordering. It caches results and invalidates them when the wrapped value changes.
| Field Summary | |
|---|---|
static long |
serialVersionUID
Used for serialization |
| Fields inherited from class org.apache.directory.api.ldap.model.entry.AbstractValue |
|---|
attributeType, h, LOG, normalizedValue, wrappedValue |
| Fields inherited from interface org.apache.directory.api.ldap.model.entry.Value |
|---|
BINARY, STRING |
| Constructor Summary | |
|---|---|
BinaryValue(AttributeType attributeType,
byte[] value)
Creates a BinaryValue with an initial wrapped binary value. |
|
BinaryValue(byte[] value)
Creates a BinaryValue with an initial wrapped binary value. |
|
| Method Summary | |
|---|---|
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 wrapped value as a byte[]. |
byte[] |
getNormValue()
Gets a direct reference to the normalized representation for the wrapped value of this ServerValue wrapper. |
String |
getString()
Get the wrapped value as a String. |
byte[] |
getValue()
Get the wrapped 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)
|
| Methods inherited from class org.apache.directory.api.ldap.model.entry.AbstractValue |
|---|
apply, getAttributeType, getLdapComparator, getNormReference, getReference, isInstanceOf, isNull, isSchemaAware, isValid |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public BinaryValue(byte[] value)
value - the binary value to wrap which may be null, or a zero length byte array
public 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 array
LdapInvalidAttributeValueException - If the added value is invalid accordingly
to the schema| Method Detail |
|---|
public byte[] getNormValue()
public int compareTo(Value<byte[]> value)
ServerValue#compareTo(Value)public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class Objectpublic 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 stream
IOException - If the stream can't be read
ClassNotFoundException - If we can't instanciate a BinaryValue
public static BinaryValue deserialize(AttributeType attributeType,
ObjectInput in)
throws IOException,
ClassNotFoundException
attributeType - The AttributeType associated with the Value. Can be nullin - The input stream
IOException - If the stream can't be read
ClassNotFoundException - If we can't instanciate a BinaryValue
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
IOExceptionpublic String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||