A - The primitive array to support.private abstract static class ArrayEncoding.FixedSizePrimitiveArrayEncoder<A> extends ArrayEncoding.AbstractArrayEncoder<A>
| Modifier and Type | Field and Description |
|---|---|
private int |
fieldSize |
arrayOid| Constructor and Description |
|---|
FixedSizePrimitiveArrayEncoder(int fieldSize,
int oid,
int arrayOid) |
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
countNulls(A array)
Counts the number of
null elements in array. |
byte[] |
toBinaryRepresentation(BaseConnection connection,
A array,
int oid) |
(package private) byte[] |
toSingleDimensionBinaryRepresentation(BaseConnection connection,
A array)
Creates
byte[] of just the raw data (no metadata). |
protected abstract void |
write(A array,
byte[] bytes,
int offset)
Write the entire contents of array to bytes starting at
offset without metadata describing type or length.
|
getDefaultArrayTypeOid, getTypeOID, supportBinaryRepresentation, toArrayStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendArrayFixedSizePrimitiveArrayEncoder(int fieldSize,
int oid,
int arrayOid)
final int countNulls(A array)
null elements in array.
Always returns 0.
countNulls in class ArrayEncoding.AbstractArrayEncoder<A>array - The array to count null elements in.null elements in array.public final byte[] toBinaryRepresentation(BaseConnection connection, A array, int oid) throws java.sql.SQLException, java.sql.SQLFeatureNotSupportedException
java.sql.SQLExceptionjava.sql.SQLFeatureNotSupportedExceptionfinal byte[] toSingleDimensionBinaryRepresentation(BaseConnection connection, A array) throws java.sql.SQLException, java.sql.SQLFeatureNotSupportedException
byte[] of just the raw data (no metadata).toSingleDimensionBinaryRepresentation in class ArrayEncoding.AbstractArrayEncoder<A>connection - The connection the binary representation will be used on.array - The array to create binary representation of. Will not be
null, but may contain null elements.byte[] of just the raw data (no metadata).java.sql.SQLFeatureNotSupportedException - If ArrayEncoding.AbstractArrayEncoder.supportBinaryRepresentation(int) is false for
oid.java.sql.SQLExceptionprotected abstract void write(A array, byte[] bytes, int offset)
array - The array to write.bytes - The byte[] to write to.offset - The offset into bytes to start writing.