public class StreamCodec extends Object implements com.singlestore.jdbc.codec.Codec<InputStream>
| Modifier and Type | Field and Description |
|---|---|
static StreamCodec |
INSTANCE |
| Constructor and Description |
|---|
StreamCodec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecode(ColumnDefinitionPacket column,
Class<?> type) |
boolean |
canEncode(Object value) |
boolean |
canEncodeLongData() |
String |
className() |
InputStream |
decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buf,
int length,
ColumnDefinitionPacket column,
Calendar cal) |
InputStream |
decodeText(com.singlestore.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() |
public static final StreamCodec INSTANCE
public String className()
className in interface com.singlestore.jdbc.codec.Codec<InputStream>public boolean canDecode(ColumnDefinitionPacket column, Class<?> type)
canDecode in interface com.singlestore.jdbc.codec.Codec<InputStream>public InputStream decodeText(com.singlestore.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException
decodeText in interface com.singlestore.jdbc.codec.Codec<InputStream>SQLDataExceptionpublic InputStream decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException
decodeBinary in interface com.singlestore.jdbc.codec.Codec<InputStream>SQLDataExceptionpublic boolean canEncode(Object value)
canEncode in interface com.singlestore.jdbc.codec.Codec<InputStream>public void encodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLen) throws IOException
encodeText in interface com.singlestore.jdbc.codec.Codec<InputStream>IOExceptionpublic void encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long maxLength) throws IOException
encodeBinary in interface com.singlestore.jdbc.codec.Codec<InputStream>IOExceptionpublic void encodeLongData(PacketWriter encoder, InputStream value, Long maxLength) throws IOException
encodeLongData in interface com.singlestore.jdbc.codec.Codec<InputStream>IOExceptionpublic byte[] encodeData(InputStream value, Long maxLength) throws IOException
encodeData in interface com.singlestore.jdbc.codec.Codec<InputStream>IOExceptionpublic int getBinaryEncodeType()
getBinaryEncodeType in interface com.singlestore.jdbc.codec.Codec<InputStream>public boolean canEncodeLongData()
canEncodeLongData in interface com.singlestore.jdbc.codec.Codec<InputStream>Copyright © 2022 SingleStore. All rights reserved.