Class ObjectSerializerFactoryImpl
- java.lang.Object
-
- org.identityconnectors.framework.common.serializer.ObjectSerializerFactory
-
- org.identityconnectors.framework.impl.serializer.ObjectSerializerFactoryImpl
-
public class ObjectSerializerFactoryImpl extends ObjectSerializerFactory
-
-
Constructor Summary
Constructors Constructor Description ObjectSerializerFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deserializeXmlStream(InputSource is, XmlObjectResultsHandler handler, boolean validate)
Deserializes XML objects from a stream NOTE: Consider usingSerializerUtil.deserializeXmlObject(String,boolean)
for convenience deserializing a single object.BinaryObjectDeserializer
newBinaryDeserializer(InputStream is)
Creates aBinaryObjectDeserializer
for reading objects from the given stream.BinaryObjectSerializer
newBinarySerializer(OutputStream os)
Creates aBinaryObjectSerializer
for writing objects to the given stream.XmlObjectSerializer
newXmlSerializer(Writer w, boolean includeHeader, boolean multiObject)
Creates aBinaryObjectSerializer
for writing objects to the given stream.-
Methods inherited from class org.identityconnectors.framework.common.serializer.ObjectSerializerFactory
getInstance
-
-
-
-
Method Detail
-
newBinaryDeserializer
public BinaryObjectDeserializer newBinaryDeserializer(InputStream is)
Description copied from class:ObjectSerializerFactory
Creates aBinaryObjectDeserializer
for reading objects from the given stream. NOTE: Consider usingSerializerUtil.deserializeBinaryObject(byte[])
for convenience deserializing a single object. NOTE2: Do not mix and matchSerializerUtil.deserializeBinaryObject(byte[])
with {ObjectSerializerFactory.newBinarySerializer(OutputStream)
. This is unsafe since there is header information and state associated with the stream. Objects written using one method must be read using the proper corresponding method.- Specified by:
newBinaryDeserializer
in classObjectSerializerFactory
- Parameters:
is
- The stream- Returns:
- The deserializer
-
newBinarySerializer
public BinaryObjectSerializer newBinarySerializer(OutputStream os)
Description copied from class:ObjectSerializerFactory
Creates aBinaryObjectSerializer
for writing objects to the given stream. NOTE: consider usingSerializerUtil.serializeBinaryObject(Object)
for convenience serializing a single object. NOTE2: do not mix and matchSerializerUtil.serializeBinaryObject(Object)
with {ObjectSerializerFactory.newBinaryDeserializer(InputStream)
. This is unsafe since there is header information and state associated with the stream. Objects written using one method must be read using the proper corresponding method.- Specified by:
newBinarySerializer
in classObjectSerializerFactory
- Parameters:
os
- The stream- Returns:
- The serializer
-
newXmlSerializer
public XmlObjectSerializer newXmlSerializer(Writer w, boolean includeHeader, boolean multiObject)
Description copied from class:ObjectSerializerFactory
Creates aBinaryObjectSerializer
for writing objects to the given stream. NOTE: consider usingSerializerUtil.serializeXmlObject(Object,boolean)
for convenience serializing a single object. NOTE2: do not mix and matchSerializerUtil.serializeXmlObject(Object,boolean)
with {ObjectSerializerFactory.deserializeXmlStream(InputSource, XmlObjectResultsHandler, boolean)
.- Specified by:
newXmlSerializer
in classObjectSerializerFactory
- Parameters:
w
- The writerincludeHeader
- True to include the xml headermultiObject
- Is this to produce a multi-object document. If false, only a single object may be written.- Returns:
- The serializer
-
deserializeXmlStream
public void deserializeXmlStream(InputSource is, XmlObjectResultsHandler handler, boolean validate)
Description copied from class:ObjectSerializerFactory
Deserializes XML objects from a stream NOTE: Consider usingSerializerUtil.deserializeXmlObject(String,boolean)
for convenience deserializing a single object. NOTE2: Do not mix and matchSerializerUtil.deserializeXmlObject(String,boolean)
with {ObjectSerializerFactory.newXmlSerializer(Writer, boolean, boolean)
.- Specified by:
deserializeXmlStream
in classObjectSerializerFactory
- Parameters:
is
- The input sourcehandler
- The callback to receive objects from the streamvalidate
- True if we are to validate
-
-