|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.partition.impl.btree.jdbm.AttributeSerializer
Serializes a attributes object using a custom serialization mechanism so we do not have to rely on Java Serialization which is much more costly.
Constructor Summary | |
AttributeSerializer()
|
Method Summary | |
java.lang.Object |
deserialize(byte[] buf)
Deserializes an attribute from the custom serialization structure. |
static org.apache.directory.server.core.partition.impl.btree.jdbm.AttributeSerializer.DeserializedAttribute |
deserialize(byte[] buf,
int offset)
Deserializes an attribute from the custom serialization structure. |
byte[] |
serialize(java.lang.Object obj)
Serializes an attribute using the following structure:
[id-length][id-bytes][is-binary][length0][value0]...[lengthN][valueN]
Here the id-length is the 4 byte int value of the length of bytes
for the id string bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AttributeSerializer()
Method Detail |
public final java.lang.Object deserialize(byte[] buf) throws java.io.IOException
java.io.IOException
jdbm.helper.Serializer#deserialize(byte[])
public static final org.apache.directory.server.core.partition.impl.btree.jdbm.AttributeSerializer.DeserializedAttribute deserialize(byte[] buf, int offset) throws java.io.IOException
java.io.IOException
jdbm.helper.Serializer#deserialize(byte[])
public byte[] serialize(java.lang.Object obj) throws java.io.IOException
[id-length][id-bytes][is-binary][length0][value0]...[lengthN][valueN]
Here the id-length is the 4 byte int value of the length of bytes
for the id string bytes. The id-bytes are the bytes for the id string.
The is-binary byte is a true or false for whether or not the values
are byte[] or String types. Following this is an array of length-value
tuples for the values of the Attributes.
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |