com.microsoft.tfs.core.persistence
Interface ObjectSerializer

All Known Implementing Classes:
CachedCredentialsSerializer, com.microsoft.tfs.core.internal.persistence.DOMObjectSerializer, ServerListSerializer

public interface ObjectSerializer

A ObjectSerializer is used to serialize and deserialize in-memory objects out to byte streams. Several implementations exist in this package.

See Also:
PersistenceStore
Since:
TEE-SDK-10.1

Method Summary
 java.lang.Object deserialize(java.io.InputStream inputStream)
          Deserializes the contents of a byte stream and produce an in-memory object.
 void serialize(java.lang.Object object, java.io.OutputStream outputStream)
          Serializes an in-memory object to a byte stream.
 

Method Detail

serialize

void serialize(java.lang.Object object,
               java.io.OutputStream outputStream)
               throws java.io.IOException,
                      java.lang.InterruptedException
Serializes an in-memory object to a byte stream. This method should not close the supplied OutputStream - it is the caller's responsibility to close it.

Parameters:
object - the in-memory object to serialize (must not be null)
outputStream - the output stream to serialize to (must not be null)
Throws:
java.io.IOException
java.lang.InterruptedException

deserialize

java.lang.Object deserialize(java.io.InputStream inputStream)
                             throws java.io.IOException,
                                    java.lang.InterruptedException
Deserializes the contents of a byte stream and produce an in-memory object. This method should not close the supplied InputStream - it is the caller's responsibility to close it.

Parameters:
inputStream - the input stream to deserialize (must not be null)
Returns:
the result of the deserialization
Throws:
java.io.IOException
java.lang.InterruptedException


© 2015 Microsoft. All rights reserved.