Mercurial > dive4elements > framework
comparison artifacts/src/main/java/org/dive4elements/artifacts/ArtifactSerializer.java @ 471:1a87cb24a446
Moved directories to org.dive4elements
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 10:50:31 +0200 |
parents | artifacts/src/main/java/de/intevation/artifacts/ArtifactSerializer.java@933bbc9fc11f |
children | 415df0fc4fa1 |
comparison
equal
deleted
inserted
replaced
470:19cb9729bd17 | 471:1a87cb24a446 |
---|---|
1 /* | |
2 * Copyright (c) 2010 by Intevation GmbH | |
3 * | |
4 * This program is free software under the LGPL (>=v2.1) | |
5 * Read the file LGPL.txt coming with the software for details | |
6 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
7 */ | |
8 | |
9 package de.intevation.artifacts; | |
10 | |
11 /** | |
12 * Interface to make artifact persistent. | |
13 * | |
14 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> | |
15 */ | |
16 public interface ArtifactSerializer | |
17 { | |
18 /** | |
19 * Restores an artifact from an array of bytes. | |
20 * @param bytes the persistent representation of the artifact. | |
21 * @return The de-serialized artifact or null if there was an error. | |
22 */ | |
23 Artifact fromBytes(byte [] bytes); | |
24 /** | |
25 * Brings an artifact to a persistent form in form of a byte array. | |
26 * @param artifact The artifact to be serialized. | |
27 * @return the byte array representation of the artifact or null | |
28 * if there was an error. | |
29 */ | |
30 byte [] toBytes(Artifact artifact); | |
31 } | |
32 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |