Class BinaryObjectDecoder
java.lang.Object
org.identityconnectors.framework.impl.serializer.binary.BinaryObjectDecoder
- All Implemented Interfaces:
BinaryObjectDeserializer
,ObjectDecoder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the underlying streamint
Returns the number of anonymous sub-objects.boolean
Reads the value in-line.boolean
readBooleanField
(String fieldName, boolean dflt) Reads a boolean.byte[]
reads the value in-line.byte
reads the value in-line.Class
<?> reads the value in-line.Class
<?> readClassField
(String fieldName, Class<?> dflt) Reads a Class.double
reads the value in-line.double
readDoubleField
(String fieldName, double dflt) Reads a double.float
Reads the value in-line.float
readFloatField
(String fieldName, float dflt) Reads a float.int
Reads the value in-line.int
readIntField
(String fieldName, int dflt) Reads an int.long
reads the value in-line.long
readLongField
(String fieldName, long dflt) Reads a long.Reads the next object from the stream.readObjectContents
(int index) Reads a sub-objectreadObjectField
(String fieldName, Class<?> expected, Object dflt) Reads an object using the appropriate serializer for that objectReads the value in-line.readStringField
(String fieldName, String dflt) Reads a String.
-
Constructor Details
-
BinaryObjectDecoder
-
-
Method Details
-
close
public void close()Description copied from interface:BinaryObjectDeserializer
Closes the underlying stream- Specified by:
close
in interfaceBinaryObjectDeserializer
-
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
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
Description copied from interface:ObjectDecoder
reads the value in-line.- Specified by:
readClassContents
in interfaceObjectDecoder
-
readClassField
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
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
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
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
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
Description copied from interface:ObjectDecoder
Reads a sub-object- Specified by:
readObjectContents
in interfaceObjectDecoder
-
readObjectField
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
Description copied from interface:ObjectDecoder
Reads the value in-line.- Specified by:
readStringContents
in interfaceObjectDecoder
-
readStringField
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
-