Class BinaryObjectDecoder
- java.lang.Object
-
- org.identityconnectors.framework.impl.serializer.binary.BinaryObjectDecoder
-
- All Implemented Interfaces:
BinaryObjectDeserializer
,ObjectDecoder
public class BinaryObjectDecoder extends Object implements ObjectDecoder, BinaryObjectDeserializer
-
-
Constructor Summary
Constructors Constructor Description BinaryObjectDecoder(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the underlying streamint
getNumSubObjects()
Returns the number of anonymous sub-objects.boolean
readBooleanContents()
Reads the value in-line.boolean
readBooleanField(String fieldName, boolean dflt)
Reads a boolean.byte[]
readByteArrayContents()
reads the value in-line.byte
readByteContents()
reads the value in-line.Class<?>
readClassContents()
reads the value in-line.Class<?>
readClassField(String fieldName, Class<?> dflt)
Reads a Class.double
readDoubleContents()
reads the value in-line.double
readDoubleField(String fieldName, double dflt)
Reads a double.float
readFloatContents()
Reads the value in-line.float
readFloatField(String fieldName, float dflt)
Reads a float.int
readIntContents()
Reads the value in-line.int
readIntField(String fieldName, int dflt)
Reads an int.long
readLongContents()
reads the value in-line.long
readLongField(String fieldName, long dflt)
Reads a long.Object
readObject()
Reads the next object from the stream.Object
readObjectContents(int index)
Reads a sub-objectObject
readObjectField(String fieldName, Class<?> expected, Object dflt)
Reads an object using the appropriate serializer for that objectString
readStringContents()
Reads the value in-line.String
readStringField(String fieldName, String dflt)
Reads a String.
-
-
-
Constructor Detail
-
BinaryObjectDecoder
public BinaryObjectDecoder(InputStream in)
-
-
Method Detail
-
close
public void close()
Description copied from interface:BinaryObjectDeserializer
Closes the underlying stream- Specified by:
close
in interfaceBinaryObjectDeserializer
-
readObject
public Object readObject()
Description copied from interface:BinaryObjectDeserializer
Reads the next object from the stream. Throws a wrappedEOFException
if end of stream is reached.- Specified by:
readObject
in interfaceBinaryObjectDeserializer
- Returns:
- The next object from the stream.
-
readBooleanContents
public boolean readBooleanContents()
Description copied from interface:ObjectDecoder
Reads the value in-line.- Specified by:
readBooleanContents
in interfaceObjectDecoder
-
readBooleanField
public boolean readBooleanField(String fieldName, boolean dflt)
Description copied from interface:ObjectDecoder
Reads a boolean.- Specified by:
readBooleanField
in interfaceObjectDecoder
- Parameters:
fieldName
- A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
-
readByteContents
public byte readByteContents()
Description copied from interface:ObjectDecoder
reads the value in-line.- Specified by:
readByteContents
in interfaceObjectDecoder
-
readByteArrayContents
public byte[] readByteArrayContents()
Description copied from interface:ObjectDecoder
reads the value in-line.- Specified by:
readByteArrayContents
in interfaceObjectDecoder
-
readClassContents
public Class<?> readClassContents()
Description copied from interface:ObjectDecoder
reads the value in-line.- Specified by:
readClassContents
in interfaceObjectDecoder
-
readClassField
public Class<?> readClassField(String fieldName, Class<?> dflt)
Description copied from interface:ObjectDecoder
Reads a Class.- Specified by:
readClassField
in interfaceObjectDecoder
- Parameters:
fieldName
- A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
-
readDoubleContents
public double readDoubleContents()
Description copied from interface:ObjectDecoder
reads the value in-line.- Specified by:
readDoubleContents
in interfaceObjectDecoder
-
readDoubleField
public double readDoubleField(String fieldName, double dflt)
Description copied from interface:ObjectDecoder
Reads a double.- Specified by:
readDoubleField
in interfaceObjectDecoder
- Parameters:
fieldName
- A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
-
readFloatContents
public float readFloatContents()
Description copied from interface:ObjectDecoder
Reads the value in-line.- Specified by:
readFloatContents
in interfaceObjectDecoder
-
readFloatField
public float readFloatField(String fieldName, float dflt)
Description copied from interface:ObjectDecoder
Reads a float.- Specified by:
readFloatField
in interfaceObjectDecoder
- Parameters:
fieldName
- A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
-
readIntContents
public int readIntContents()
Description copied from interface:ObjectDecoder
Reads the value in-line.- Specified by:
readIntContents
in interfaceObjectDecoder
-
readIntField
public int readIntField(String fieldName, int dflt)
Description copied from interface:ObjectDecoder
Reads an int.- Specified by:
readIntField
in interfaceObjectDecoder
- Parameters:
fieldName
- A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
-
readLongContents
public long readLongContents()
Description copied from interface:ObjectDecoder
reads the value in-line.- Specified by:
readLongContents
in interfaceObjectDecoder
-
readLongField
public long readLongField(String fieldName, long dflt)
Description copied from interface:ObjectDecoder
Reads a long.- Specified by:
readLongField
in interfaceObjectDecoder
- Parameters:
fieldName
- A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
-
getNumSubObjects
public int getNumSubObjects()
Description copied from interface:ObjectDecoder
Returns the number of anonymous sub-objects.- Specified by:
getNumSubObjects
in interfaceObjectDecoder
- Returns:
-
readObjectContents
public Object readObjectContents(int index)
Description copied from interface:ObjectDecoder
Reads a sub-object- Specified by:
readObjectContents
in interfaceObjectDecoder
-
readObjectField
public Object readObjectField(String fieldName, Class<?> expected, Object dflt)
Description copied from interface:ObjectDecoder
Reads an object using the appropriate serializer for that object- Specified by:
readObjectField
in interfaceObjectDecoder
- Parameters:
fieldName
- A hint of the field name. Ignored for binary serialization. The subelement name for xml serialization
-
readStringContents
public String readStringContents()
Description copied from interface:ObjectDecoder
Reads the value in-line.- Specified by:
readStringContents
in interfaceObjectDecoder
-
readStringField
public String readStringField(String fieldName, String dflt)
Description copied from interface:ObjectDecoder
Reads a String.- Specified by:
readStringField
in interfaceObjectDecoder
- Parameters:
fieldName
- A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
-
-