io.sirix.io.bytepipe.ByteHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirix-core Show documentation
Show all versions of sirix-core Show documentation
SirixDB is a hybrid on-disk and in-memory document oriented, versioned database system. It has a lightweight buffer manager, stores everything in a huge persistent and durable tree and allows efficient reconstruction of every revision. Furthermore, SirixDB implements change tracking, diffing and supports time travel queries.
package io.sirix.io.bytepipe;
import java.io.InputStream;
import java.io.OutputStream;
/**
* Interface for the decorator, representing any byte representation to be serialized or to
* serialize.
*
* @author Sebastian Graf, University of Konstanz
*
*/
public interface ByteHandler {
/**
* Method to serialize any byte-chunk.
*
* @param toSerialize byte to be serialized
* @return result of the serialization
*/
OutputStream serialize(OutputStream toSerialize);
/**
* Method to deserialize any byte-chunk.
*
* @param toDeserialize to deserialize
* @return result of the deserialization
*/
InputStream deserialize(InputStream toDeserialize);
/**
* Method to retrieve a new instance.
*
* @return new instance
*/
ByteHandler getInstance();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy