Package org.mariadb.jdbc.codec.list
Class StreamCodec
- java.lang.Object
-
- org.mariadb.jdbc.codec.list.StreamCodec
-
- All Implemented Interfaces:
Codec<InputStream>
public class StreamCodec extends Object implements Codec<InputStream>
-
-
Field Summary
Fields Modifier and Type Field Description static StreamCodec
INSTANCE
-
Constructor Summary
Constructors Constructor Description StreamCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canDecode(ColumnDefinitionPacket column, Class<?> type)
boolean
canEncode(Object value)
boolean
canEncodeLongData()
String
className()
InputStream
decodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal)
InputStream
decodeText(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal)
void
encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long maxLength)
byte[]
encodeData(InputStream value, Long maxLength)
void
encodeLongData(PacketWriter encoder, InputStream value, Long maxLength)
void
encodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLen)
int
getBinaryEncodeType()
-
-
-
Field Detail
-
INSTANCE
public static final StreamCodec INSTANCE
-
-
Method Detail
-
className
public String className()
- Specified by:
className
in interfaceCodec<InputStream>
-
canDecode
public boolean canDecode(ColumnDefinitionPacket column, Class<?> type)
- Specified by:
canDecode
in interfaceCodec<InputStream>
-
decodeText
public InputStream decodeText(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException
- Specified by:
decodeText
in interfaceCodec<InputStream>
- Throws:
SQLDataException
-
decodeBinary
public InputStream decodeBinary(org.mariadb.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException
- Specified by:
decodeBinary
in interfaceCodec<InputStream>
- Throws:
SQLDataException
-
canEncode
public boolean canEncode(Object value)
- Specified by:
canEncode
in interfaceCodec<InputStream>
-
encodeText
public void encodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLen) throws IOException
- Specified by:
encodeText
in interfaceCodec<InputStream>
- Throws:
IOException
-
encodeBinary
public void encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long maxLength) throws IOException
- Specified by:
encodeBinary
in interfaceCodec<InputStream>
- Throws:
IOException
-
encodeLongData
public void encodeLongData(PacketWriter encoder, InputStream value, Long maxLength) throws IOException
- Specified by:
encodeLongData
in interfaceCodec<InputStream>
- Throws:
IOException
-
encodeData
public byte[] encodeData(InputStream value, Long maxLength) throws IOException
- Specified by:
encodeData
in interfaceCodec<InputStream>
- Throws:
IOException
-
getBinaryEncodeType
public int getBinaryEncodeType()
- Specified by:
getBinaryEncodeType
in interfaceCodec<InputStream>
-
canEncodeLongData
public boolean canEncodeLongData()
- Specified by:
canEncodeLongData
in interfaceCodec<InputStream>
-
-