Package com.attivio.client.streaming
Class ObjectOutputSerializer
- java.lang.Object
-
- com.attivio.client.streaming.ObjectOutputSerializer
-
- All Implemented Interfaces:
StreamingObjectSerializer
public class ObjectOutputSerializer extends java.lang.Object implements StreamingObjectSerializer
Uses xml to serializes objects over a stream.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intSEARCH_DOCUMENTprotected static intSTRING_OBJECTprotected static intXSTREAM_OBJECT
-
Constructor Summary
Constructors Constructor Description ObjectOutputSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectdeserialize(java.io.InputStream in)Read a single entry from the stream, returns null if the stream is closed/finished.static ObjectOutputSerializergetInstance()Get a static ObjectOutputSerializer instance.protected static java.lang.ObjectreadObject(java.io.InputStream in)XStream deserialization of next object fromin.voidserialize(java.lang.Object obj, java.io.OutputStream out)Write a single object to the stream.
-
-
-
Field Detail
-
XSTREAM_OBJECT
protected static final int XSTREAM_OBJECT
- See Also:
- Constant Field Values
-
SEARCH_DOCUMENT
protected static final int SEARCH_DOCUMENT
- See Also:
- Constant Field Values
-
STRING_OBJECT
protected static final int STRING_OBJECT
- See Also:
- Constant Field Values
-
-
Method Detail
-
serialize
public void serialize(java.lang.Object obj, java.io.OutputStream out) throws java.io.IOExceptionDescription copied from interface:StreamingObjectSerializerWrite a single object to the stream. It is possible that more calls to serialize will be made with more objects- Specified by:
serializein interfaceStreamingObjectSerializer- Throws:
java.io.IOException
-
deserialize
public java.lang.Object deserialize(java.io.InputStream in) throws java.io.IOExceptionDescription copied from interface:StreamingObjectSerializerRead a single entry from the stream, returns null if the stream is closed/finished. Future calls to deserialize should return the next object, ie this should not 'over-read'.- Specified by:
deserializein interfaceStreamingObjectSerializer- Throws:
java.io.IOException
-
getInstance
public static ObjectOutputSerializer getInstance()
Get a static ObjectOutputSerializer instance.
-
readObject
protected static java.lang.Object readObject(java.io.InputStream in) throws java.io.IOExceptionXStream deserialization of next object fromin.- Throws:
java.io.IOException
-
-