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 int
SEARCH_DOCUMENT
protected static int
STRING_OBJECT
protected static int
XSTREAM_OBJECT
-
Constructor Summary
Constructors Constructor Description ObjectOutputSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
deserialize(java.io.InputStream in)
Read a single entry from the stream, returns null if the stream is closed/finished.static ObjectOutputSerializer
getInstance()
Get a static ObjectOutputSerializer instance.protected static java.lang.Object
readObject(java.io.InputStream in)
XStream deserialization of next object fromin
.void
serialize(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.IOException
Description copied from interface:StreamingObjectSerializer
Write a single object to the stream. It is possible that more calls to serialize will be made with more objects- Specified by:
serialize
in interfaceStreamingObjectSerializer
- Throws:
java.io.IOException
-
deserialize
public java.lang.Object deserialize(java.io.InputStream in) throws java.io.IOException
Description copied from interface:StreamingObjectSerializer
Read 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:
deserialize
in 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.IOException
XStream deserialization of next object fromin
.- Throws:
java.io.IOException
-
-