Class StreamParameter
java.lang.Object
org.mariadb.jdbc.internal.com.send.parameters.StreamParameter
- All Implemented Interfaces:
Cloneable
,ParameterHolder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InputStream
private final long
private final boolean
Fields inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
BINARY_INTRODUCER, QUOTE
-
Constructor Summary
ConstructorsConstructorDescriptionStreamParameter
(InputStream is, boolean noBackSlashEscapes) StreamParameter
(InputStream is, long length, boolean noBackslashEscapes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Return approximated data calculated length.boolean
toString()
void
Write data to socket in binary format.void
void
Write stream in text format.
-
Field Details
-
is
-
length
private final long length -
noBackslashEscapes
private final boolean noBackslashEscapes
-
-
Constructor Details
-
StreamParameter
Constructor.- Parameters:
is
- stream to writelength
- max length to write (if null the whole stream will be send)noBackslashEscapes
- must backslash be escape
-
StreamParameter
-
-
Method Details
-
writeTo
Write stream in text format.- Specified by:
writeTo
in interfaceParameterHolder
- Parameters:
pos
- database outputStream- Throws:
IOException
- if any error occur when reader stream
-
getApproximateTextProtocolLength
public int getApproximateTextProtocolLength()Return approximated data calculated length.- Specified by:
getApproximateTextProtocolLength
in interfaceParameterHolder
- Returns:
- approximated data length.
-
writeBinary
Write data to socket in binary format.- Specified by:
writeBinary
in interfaceParameterHolder
- Parameters:
pos
- socket output stream- Throws:
IOException
- if socket error occur
-
writeLongData
- Specified by:
writeLongData
in interfaceParameterHolder
- Throws:
IOException
-
toString
- Specified by:
toString
in interfaceParameterHolder
- Overrides:
toString
in classObject
-
getColumnType
- Specified by:
getColumnType
in interfaceParameterHolder
-
isNullData
public boolean isNullData()- Specified by:
isNullData
in interfaceParameterHolder
-
canBeLongData
public boolean canBeLongData()- Specified by:
canBeLongData
in interfaceParameterHolder
-