Package org.mariadb.jdbc.plugin.codec
Class GeometryCollectionCodec
- java.lang.Object
-
- org.mariadb.jdbc.plugin.codec.GeometryCollectionCodec
-
- All Implemented Interfaces:
Codec<GeometryCollection>
public class GeometryCollectionCodec extends Object implements Codec<GeometryCollection>
GeometryCollection codec
-
-
Field Summary
Fields Modifier and Type Field Description static GeometryCollectionCodecINSTANCEdefault instance
-
Constructor Summary
Constructors Constructor Description GeometryCollectionCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDecode(org.mariadb.jdbc.client.ColumnDecoder column, Class<?> type)If codec can decode this a server datatype to a java class typebooleancanEncode(Object value)Can Codec encode the java object typeStringclassName()Codec native typeGeometryCollectiondecodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buf, MutableInt length, org.mariadb.jdbc.client.ColumnDecoder column, Calendar cal)Decode from a mysql packet binary encoded a value to codec java typeGeometryCollectiondecodeText(org.mariadb.jdbc.client.ReadableByteBuf buf, MutableInt length, org.mariadb.jdbc.client.ColumnDecoder column, Calendar cal)Decode from a mysql packet text encoded a value to codec java typevoidencodeBinary(Writer encoder, Object value, Calendar cal, Long maxLength)Binary encode value to writervoidencodeText(Writer encoder, org.mariadb.jdbc.client.Context context, Object value, Calendar cal, Long maxLength)Text encode value to writerintgetBinaryEncodeType()Return server encoding data type-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.jdbc.plugin.Codec
canEncodeLongData, encodeData, encodeLongData
-
-
-
-
Field Detail
-
INSTANCE
public static final GeometryCollectionCodec INSTANCE
default instance
-
-
Method Detail
-
className
public String className()
Description copied from interface:CodecCodec native type- Specified by:
classNamein interfaceCodec<GeometryCollection>- Returns:
- code native return type
-
canDecode
public boolean canDecode(org.mariadb.jdbc.client.ColumnDecoder column, Class<?> type)Description copied from interface:CodecIf codec can decode this a server datatype to a java class type- Specified by:
canDecodein interfaceCodec<GeometryCollection>- Parameters:
column- server datatypetype- java return class- Returns:
- true if codec can decode it
-
canEncode
public boolean canEncode(Object value)
Description copied from interface:CodecCan Codec encode the java object type- Specified by:
canEncodein interfaceCodec<GeometryCollection>- Parameters:
value- java object type- Returns:
- true if codec can encode java type
-
decodeText
public GeometryCollection decodeText(org.mariadb.jdbc.client.ReadableByteBuf buf, MutableInt length, org.mariadb.jdbc.client.ColumnDecoder column, Calendar cal) throws SQLDataException
Description copied from interface:CodecDecode from a mysql packet text encoded a value to codec java type- Specified by:
decodeTextin interfaceCodec<GeometryCollection>- Parameters:
buf- mysql packet bufferlength- encoded value lengthcolumn- server column metadatacal- calendar- Returns:
- decoded value
- Throws:
SQLDataException- if unexpected error occurs during decoding
-
decodeBinary
public GeometryCollection decodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buf, MutableInt length, org.mariadb.jdbc.client.ColumnDecoder column, Calendar cal) throws SQLDataException
Description copied from interface:CodecDecode from a mysql packet binary encoded a value to codec java type- Specified by:
decodeBinaryin interfaceCodec<GeometryCollection>- Parameters:
buf- mysql packet bufferlength- encoded value lengthcolumn- server column metadatacal- calendar- Returns:
- decoded value
- Throws:
SQLDataException- if unexpected error occurs during decoding
-
encodeText
public void encodeText(Writer encoder, org.mariadb.jdbc.client.Context context, Object value, Calendar cal, Long maxLength) throws IOException
Description copied from interface:CodecText encode value to writer- Specified by:
encodeTextin interfaceCodec<GeometryCollection>- Parameters:
encoder- writercontext- connection contextvalue- value to encodecal- calendarmaxLength- maximum value length- Throws:
IOException- if any socket error occurs
-
encodeBinary
public void encodeBinary(Writer encoder, Object value, Calendar cal, Long maxLength) throws IOException
Description copied from interface:CodecBinary encode value to writer- Specified by:
encodeBinaryin interfaceCodec<GeometryCollection>- Parameters:
encoder- writervalue- value to encodecal- calendarmaxLength- maximum value length- Throws:
IOException- if any socket error occurs
-
getBinaryEncodeType
public int getBinaryEncodeType()
Description copied from interface:CodecReturn server encoding data type- Specified by:
getBinaryEncodeTypein interfaceCodec<GeometryCollection>- Returns:
- server encoding data type
-
-