Class ByteArrayByteBufferConverter
- java.lang.Object
-
- org.datanucleus.store.types.converters.ByteArrayByteBufferConverter
-
- All Implemented Interfaces:
Serializable
,TypeConverter<byte[],ByteBuffer>
public class ByteArrayByteBufferConverter extends Object implements TypeConverter<byte[],ByteBuffer>
Convenience class to handle Java serialisation of a byte[] object to/from ByteBuffer.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteArrayByteBufferConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuffer
toDatastoreType(byte[] memberValue)
Method to convert the passed member value to the datastore type.byte[]
toMemberType(ByteBuffer datastoreValue)
Method to convert the passed datastore value to the member type.
-
-
-
Method Detail
-
toDatastoreType
public ByteBuffer toDatastoreType(byte[] memberValue)
Description copied from interface:TypeConverter
Method to convert the passed member value to the datastore type.- Specified by:
toDatastoreType
in interfaceTypeConverter<byte[],ByteBuffer>
- Parameters:
memberValue
- Value from the member- Returns:
- Value for the datastore
-
toMemberType
public byte[] toMemberType(ByteBuffer datastoreValue)
Description copied from interface:TypeConverter
Method to convert the passed datastore value to the member type.- Specified by:
toMemberType
in interfaceTypeConverter<byte[],ByteBuffer>
- Parameters:
datastoreValue
- Value from the datastore- Returns:
- Value for the member
-
-