Package com.atlassian.bamboo.serialisers
Interface ObjectSerialiser
-
- All Known Implementing Classes:
JavaObjectSerialiser,KryoObjectSerialiser,XStreamObjectSerialiser
public interface ObjectSerialiserInterface for classes capable of Serialising/deserialising objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetTag()Returns an unique identifier for this object serialiserPair<InputStream,Object>readObject(InputStream inputStream)Retreieves an object from a stream.@NotNull OutputStreamwriteObject(Object object, OutputStream outputStream)Writes an object to the supplied stream.
-
-
-
Method Detail
-
writeObject
@NotNull @NotNull OutputStream writeObject(Object object, OutputStream outputStream) throws IOException
Writes an object to the supplied stream. Returns a stream that should be used for subsequent calls, or closed if no longer needed. It may be the same stream or a wrapped stream.- Throws:
IOException
-
readObject
Pair<InputStream,Object> readObject(InputStream inputStream) throws IOException, ClassNotFoundException
Retreieves an object from a stream. Returns a stream and a desrialised object. The stream should be used for subsequent calls, or closed if no longer needed. It may be the same stream or a wrapped stream.- Parameters:
inputStream-- Throws:
IOExceptionClassNotFoundException
-
getTag
int getTag()
Returns an unique identifier for this object serialiser
-
-