Package kieker.common.record.io
Class BinaryValueDeserializer
java.lang.Object
kieker.common.record.io.AbstractValueDeserializer
kieker.common.record.io.BinaryValueDeserializer
- All Implemented Interfaces:
IValueDeserializer
public class BinaryValueDeserializer extends AbstractValueDeserializer implements IValueDeserializer
Default value deserializer implementation.
- Since:
- 1.13
- Author:
- Holger Knoche, Reiner Jung - enumeration support
-
Constructor Summary
Constructors Modifier Constructor Description protected
BinaryValueDeserializer(java.nio.ByteBuffer buffer, ReaderRegistry<java.lang.String> stringRegistry)
Create a binary value deserializer. -
Method Summary
Modifier and Type Method Description static BinaryValueDeserializer
create(java.nio.ByteBuffer buffer, ReaderRegistry<java.lang.String> stringRegistry)
Factory method to create a binary value deserializer.boolean
getBoolean()
Retrieves aboolean
value from the underlying data source.byte
getByte()
Retrieves abyte
value from the underlying data source.char
getChar()
Retrieves achar
value from the underlying data source.double
getDouble()
Retrieves adouble
value from the underlying data source.<T extends java.lang.Enum<T>>
TgetEnumeration(java.lang.Class<T> clazz)
Retrieves aEnumeration
value from the underlying data source.float
getFloat()
Retrieves afloat
value from the underlying data source.int
getInt()
Retrieves anint
value from the underlying data source.long
getLong()
Retrieves along
value from the underlying data source.short
getShort()
Retrieves ashort
value from the underlying data source.java.lang.String
getString()
Retrieves aString
value from the underlying data source.
-
Constructor Details
-
BinaryValueDeserializer
protected BinaryValueDeserializer(java.nio.ByteBuffer buffer, ReaderRegistry<java.lang.String> stringRegistry)Create a binary value deserializer.- Parameters:
buffer
- buffer for the deserializerstringRegistry
- the string registry used for the deserializer
-
-
Method Details
-
create
public static BinaryValueDeserializer create(java.nio.ByteBuffer buffer, ReaderRegistry<java.lang.String> stringRegistry)Factory method to create a binary value deserializer.- Parameters:
buffer
- serialization bufferstringRegistry
- the string registry used for the deserializer- Returns:
- the value deserializer
-
getBoolean
public boolean getBoolean()Description copied from interface:IValueDeserializer
Retrieves aboolean
value from the underlying data source.- Specified by:
getBoolean
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-
getByte
public byte getByte()Description copied from interface:IValueDeserializer
Retrieves abyte
value from the underlying data source.- Specified by:
getByte
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-
getInt
public int getInt()Description copied from interface:IValueDeserializer
Retrieves anint
value from the underlying data source.- Specified by:
getInt
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-
getLong
public long getLong()Description copied from interface:IValueDeserializer
Retrieves along
value from the underlying data source.- Specified by:
getLong
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-
getDouble
public double getDouble()Description copied from interface:IValueDeserializer
Retrieves adouble
value from the underlying data source.- Specified by:
getDouble
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-
getString
public java.lang.String getString()Description copied from interface:IValueDeserializer
Retrieves aString
value from the underlying data source.- Specified by:
getString
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-
getEnumeration
public <T extends java.lang.Enum<T>> T getEnumeration(java.lang.Class<T> clazz) throws RecordInstantiationExceptionDescription copied from interface:IValueDeserializer
Retrieves aEnumeration
value from the underlying data source.- Specified by:
getEnumeration
in interfaceIValueDeserializer
- Type Parameters:
T
- the corresponding enumeration type- Parameters:
clazz
- enumeration type to be used- Returns:
- The retrieved value
- Throws:
RecordInstantiationException
- in case the received ordinal does not exist in the specified enumeration type
-
getChar
public char getChar()Description copied from interface:IValueDeserializer
Retrieves achar
value from the underlying data source.- Specified by:
getChar
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-
getShort
public short getShort()Description copied from interface:IValueDeserializer
Retrieves ashort
value from the underlying data source.- Specified by:
getShort
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-
getFloat
public float getFloat()Description copied from interface:IValueDeserializer
Retrieves afloat
value from the underlying data source.- Specified by:
getFloat
in interfaceIValueDeserializer
- Returns:
- The retrieved value
-