public class ArrayMarshaller<E> extends Object implements Marshaller<ArrayTree<E>>
Constructor and Description |
---|
ArrayMarshaller(Comparator<E> comparator)
Creates a new instance of AvlTreeMarshaller with the default key
Marshaller which uses Java Serialization.
|
ArrayMarshaller(Comparator<E> comparator,
Marshaller<E> keyMarshaller)
Creates a new instance of AvlTreeMarshaller with a custom key
Marshaller.
|
Modifier and Type | Method and Description |
---|---|
ArrayTree<E> |
deserialize(byte[] data)
Creates an Array from given bytes of data.
|
byte[] |
serialize(ArrayTree<E> tree)
Marshals the given tree to bytes
|
public ArrayMarshaller(Comparator<E> comparator, Marshaller<E> keyMarshaller)
comparator
- Comparator to be used for key comparisionkeyMarshaller
- marshaller for keyspublic ArrayMarshaller(Comparator<E> comparator)
comparator
- Comparator to be used for key comparisionpublic byte[] serialize(ArrayTree<E> tree)
serialize
in interface Marshaller<ArrayTree<E>>
tree
- the tree to be marshalledpublic ArrayTree<E> deserialize(byte[] data) throws IOException
deserialize
in interface Marshaller<ArrayTree<E>>
data
- byte array to be converted into an arrayIOException
Copyright © 2003–2023 The Apache Software Foundation. All rights reserved.