sascha@41: package de.intevation.artifacts; sascha@41: sascha@41: /** sascha@41: * Interface to make artifact persistent. sascha@41: * sascha@77: * @author Sascha L. Teichmann sascha@41: */ sascha@41: public interface ArtifactSerializer sascha@41: { sascha@78: /** sascha@78: * Restores an artifact from an array of bytes. sascha@78: * @param bytes the persistent representation of the artifact. sascha@78: * @return The de-serialized artifact or null if there was an error. sascha@78: */ sascha@41: Artifact fromBytes(byte [] bytes); sascha@78: /** sascha@78: * Brings an artifact to a persistent form in form of a byte array. sascha@78: * @param artifact The artifact to be serialized. sascha@78: * @return the byte array representation of the artifact or null sascha@78: * if there was an error. sascha@78: */ sascha@41: byte [] toBytes(Artifact artifact); sascha@41: } sascha@41: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: