T - The Java primitive array type this codec handlespublic abstract class AbstractPrimitiveArrayCodec<T> extends AbstractArrayCodec<T>
serialize(Object, ProtocolVersion)
and deserialize(ByteBuffer, ProtocolVersion) for primitive arrays.com.datastax.driver.core.TypeCodec.AbstractCollectionCodec<E,C extends Collection<E>>, com.datastax.driver.core.TypeCodec.AbstractMapCodec<K,V>, com.datastax.driver.core.TypeCodec.AbstractTupleCodec<T>, com.datastax.driver.core.TypeCodec.AbstractUDTCodec<T>, com.datastax.driver.core.TypeCodec.PrimitiveBooleanCodec, com.datastax.driver.core.TypeCodec.PrimitiveByteCodec, com.datastax.driver.core.TypeCodec.PrimitiveDoubleCodec, com.datastax.driver.core.TypeCodec.PrimitiveFloatCodec, com.datastax.driver.core.TypeCodec.PrimitiveIntCodec, com.datastax.driver.core.TypeCodec.PrimitiveLongCodec, com.datastax.driver.core.TypeCodec.PrimitiveShortCodec| Constructor and Description |
|---|
AbstractPrimitiveArrayCodec(com.datastax.driver.core.DataType.CollectionType cqlType,
Class<T> javaClass) |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(ByteBuffer bytes,
com.datastax.driver.core.ProtocolVersion protocolVersion) |
protected abstract void |
deserializeElement(ByteBuffer input,
T array,
int index,
com.datastax.driver.core.ProtocolVersion protocolVersion)
Read the
indexth element of array from input. |
ByteBuffer |
serialize(T array,
com.datastax.driver.core.ProtocolVersion protocolVersion) |
protected abstract void |
serializeElement(ByteBuffer output,
T array,
int index,
com.datastax.driver.core.ProtocolVersion protocolVersion)
Write the
indexth element of array to output. |
protected abstract int |
sizeOfComponentType()
Return the size in bytes of the array component type.
|
format, formatElement, newInstance, parse, parseElementaccepts, accepts, accepts, accepts, ascii, bigint, blob, cboolean, cdouble, cfloat, cint, counter, custom, date, decimal, getCqlType, getJavaType, inet, list, map, set, smallInt, time, timestamp, timeUUID, tinyInt, toString, tuple, userType, uuid, varchar, varintpublic ByteBuffer serialize(T array, com.datastax.driver.core.ProtocolVersion protocolVersion) throws com.datastax.driver.core.exceptions.InvalidTypeException
serialize in class com.datastax.driver.core.TypeCodec<T>com.datastax.driver.core.exceptions.InvalidTypeExceptionpublic T deserialize(ByteBuffer bytes, com.datastax.driver.core.ProtocolVersion protocolVersion) throws com.datastax.driver.core.exceptions.InvalidTypeException
deserialize in class com.datastax.driver.core.TypeCodec<T>com.datastax.driver.core.exceptions.InvalidTypeExceptionprotected abstract int sizeOfComponentType()
protected abstract void serializeElement(ByteBuffer output, T array, int index, com.datastax.driver.core.ProtocolVersion protocolVersion)
indexth element of array to output.output - The ByteBuffer to write to.array - The array to read from.index - The element index.protocolVersion - The protocol version to use.protected abstract void deserializeElement(ByteBuffer input, T array, int index, com.datastax.driver.core.ProtocolVersion protocolVersion)
indexth element of array from input.input - The ByteBuffer to read from.array - The array to write to.index - The element index.protocolVersion - The protocol version to use.Copyright © 2012–2018. All rights reserved.