|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.ldap.entry.AbstractValue<byte[]>
org.apache.directory.shared.ldap.entry.client.ClientBinaryValue
public class ClientBinaryValue
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 |
---|
Fields inherited from class org.apache.directory.shared.ldap.entry.AbstractValue |
---|
normalized, normalizedValue, valid, wrapped |
Constructor Summary | |
---|---|
ClientBinaryValue()
Creates a ServerBinaryValue without an initial wrapped value. |
|
ClientBinaryValue(byte[] wrapped)
Creates a ServerBinaryValue with an initial wrapped binary value. |
Method Summary | |
---|---|
void |
clear()
Reset the value |
ClientBinaryValue |
clone()
|
int |
compareTo(Value<byte[]> value)
|
boolean |
equals(java.lang.Object obj)
Checks to see if this ServerBinaryValue equals the supplied object. |
byte[] |
getCopy()
Gets a copy of the binary value. |
byte[] |
getNormalizedValueCopy()
Gets a direct reference to the normalized representation for the wrapped value of this ServerValue wrapper. |
int |
hashCode()
|
boolean |
isBinary()
Tells if the current value is Binary or String |
void |
normalize(Normalizer normalizer)
Normalize the value. |
void |
readExternal(java.io.ObjectInput in)
|
void |
set(byte[] wrapped)
Sets this value's wrapped value to a copy of the src array. |
java.lang.String |
toString()
Dumps binary in hex with label. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class org.apache.directory.shared.ldap.entry.AbstractValue |
---|
get, getNormalizedValue, getNormalizedValueReference, getReference, isNormalized, isNull, isValid, isValid, normalize, setNormalized |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClientBinaryValue()
attributeType
- the schema type associated with this ServerBinaryValuepublic ClientBinaryValue(byte[] wrapped)
attributeType
- the schema type associated with this ServerBinaryValuewrapped
- the binary value to wrap which may be null, or a zero length byte arrayMethod Detail |
---|
public void clear()
clear
in interface Value<byte[]>
clear
in class AbstractValue<byte[]>
public final void set(byte[] wrapped)
AbstractValue
set
in interface Value<byte[]>
set
in class AbstractValue<byte[]>
wrapped
- the byte array to use as the wrapped valuepublic byte[] getNormalizedValueCopy()
javax.naming.NamingException
- if schema entity resolution fails or normalization failspublic final void normalize(Normalizer normalizer) throws javax.naming.NamingException
Normalizer
- The normalizer to apply to the value
javax.naming.NamingException
- If the value cannot be normalizedpublic int compareTo(Value<byte[]> value)
java.lang.IllegalStateException
- on failures to extract the comparator, or the
normalizers needed to perform the required comparisons based on the schemaServerValue#compareTo(ServerValue)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
java.lang.IllegalStateException
- on failures to extract the comparator, or the
normalizers needed to perform the required comparisons based on the schemapublic ClientBinaryValue clone()
clone
in interface Value<byte[]>
clone
in class AbstractValue<byte[]>
public byte[] getCopy()
public boolean isBinary()
true
if the value is Binary, false
otherwisepublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
Externalizable.readExternal(ObjectInput)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
java.io.IOException
Externalizable.writeExternal(ObjectOutput)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |