public class StreamParameter extends Object implements ParameterHolder
Constructor and Description |
---|
StreamParameter(InputStream is,
boolean noBackSlashEscapes) |
StreamParameter(InputStream is,
long length,
boolean noBackslashEscapes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getApproximateTextProtocolLength()
Return approximated data calculated length.
|
MariaDbType |
getMariaDbType() |
boolean |
isLongData() |
boolean |
isNullData() |
String |
toString() |
void |
writeBinary(PacketOutputStream os)
Write stream in binary format.
|
void |
writeTo(PacketOutputStream os)
Write stream in text format.
|
void |
writeUnsafeTo(PacketOutputStream os)
Write stream in text format without checking buffer size.
|
public StreamParameter(InputStream is, long length, boolean noBackslashEscapes)
is
- stream to writelength
- max length to write (if null the whole stream will be send)noBackslashEscapes
- must backslash be escapepublic StreamParameter(InputStream is, boolean noBackSlashEscapes)
public void writeTo(PacketOutputStream os) throws IOException
writeTo
in interface ParameterHolder
os
- database outputStreamIOException
- if any error occur when reader streampublic void writeUnsafeTo(PacketOutputStream os) throws IOException
writeUnsafeTo
in interface ParameterHolder
os
- database outputStreamIOException
- if any error occur when reader streampublic long getApproximateTextProtocolLength() throws IOException
getApproximateTextProtocolLength
in interface ParameterHolder
IOException
- if error reading streampublic void writeBinary(PacketOutputStream os) throws IOException
writeBinary
in interface ParameterHolder
os
- database outputStreamIOException
- if any error occur when reader streampublic String toString()
toString
in interface ParameterHolder
toString
in class Object
public MariaDbType getMariaDbType()
getMariaDbType
in interface ParameterHolder
public boolean isLongData()
isLongData
in interface ParameterHolder
public boolean isNullData()
isNullData
in interface ParameterHolder
Copyright © 2017. All rights reserved.