public class StandardSerializer extends Object implements AttributeHandler, Serializer
| Constructor and Description |
|---|
StandardSerializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
<V> V |
convert(Class<V> datatype,
Object value)
Converts the given (not-null) value to the this datatype V.
|
DataOutput |
getDataOutput(int initialCapacity) |
boolean |
isOrderPreservingDatatype(Class<?> datatype) |
Object |
readClassAndObject(ScanBuffer buffer) |
<T> T |
readObject(ScanBuffer buffer,
Class<T> type) |
<T> T |
readObjectByteOrder(ScanBuffer buffer,
Class<T> type) |
<T> T |
readObjectNotNull(ScanBuffer buffer,
Class<T> type) |
<V> void |
registerClass(int registrationNo,
Class<V> datatype,
AttributeSerializer<V> serializer) |
<V> void |
registerClassInternal(int registrationNo,
Class<? extends V> datatype,
AttributeSerializer<V> serializer) |
boolean |
validDataType(Class datatype) |
<V> void |
verifyAttribute(Class<V> datatype,
Object value) |
public <V> void registerClass(int registrationNo,
Class<V> datatype,
AttributeSerializer<V> serializer)
registerClass in interface AttributeHandlerpublic <V> void registerClassInternal(int registrationNo,
Class<? extends V> datatype,
AttributeSerializer<V> serializer)
public boolean validDataType(Class datatype)
validDataType in interface AttributeHandlerpublic <V> void verifyAttribute(Class<V> datatype, Object value)
verifyAttribute in interface AttributeHandlerpublic <V> V convert(Class<V> datatype, Object value)
AttributeHandlerIllegalArgumentException if it cannot be converted.convert in interface AttributeHandlervalue - to convertpublic boolean isOrderPreservingDatatype(Class<?> datatype)
isOrderPreservingDatatype in interface AttributeHandlerpublic <T> T readObjectByteOrder(ScanBuffer buffer, Class<T> type)
readObjectByteOrder in interface Serializerpublic <T> T readObject(ScanBuffer buffer, Class<T> type)
readObject in interface Serializerpublic <T> T readObjectNotNull(ScanBuffer buffer, Class<T> type)
readObjectNotNull in interface Serializerpublic Object readClassAndObject(ScanBuffer buffer)
readClassAndObject in interface Serializerpublic DataOutput getDataOutput(int initialCapacity)
getDataOutput in interface Serializerpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2012–2015. All rights reserved.