com.atlassian.bamboo.serialisers
Interface ObjectSerialiser

All Known Implementing Classes:
JavaObjectSerialiser, KryoObjectSerialiser, XStreamObjectSerialiser

public interface ObjectSerialiser

Interface for classes capable of Serialising/deserialising objects.


Method Summary
 int getTag()
          Returns an unique identifier for this object serialiser
 Pair<java.io.InputStream,java.lang.Object> readObject(java.io.InputStream inputStream)
          Retreieves an object from a stream.
 java.io.OutputStream writeObject(java.lang.Object object, java.io.OutputStream outputStream)
          Writes an object to the supplied stream.
 

Method Detail

writeObject

@NotNull
java.io.OutputStream writeObject(java.lang.Object object,
                                         java.io.OutputStream outputStream)
                                 throws java.io.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:
java.io.IOException

readObject

Pair<java.io.InputStream,java.lang.Object> readObject(java.io.InputStream inputStream)
                                                      throws java.io.IOException,
                                                             java.lang.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:
java.io.IOException
java.lang.ClassNotFoundException

getTag

int getTag()
Returns an unique identifier for this object serialiser



Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.