close
(package private) void close()
Close the output stream.
flush
(package private) void flush()
throws IOException
Flush the packet to the output stream setting the last packet flag.
getBufferSize
(package private) int getBufferSize()
Retrieve the current output packet size.
- the packet size as an
int
.
getMaxDecimalBytes
(package private) byte getMaxDecimalBytes()
Returns the maximum number of bytes required to output a decimal
given the current
maxPrecision
.
- the maximum number of bytes required to output a decimal.
getMaxPrecision
(package private) int getMaxPrecision()
Retrive the maximum decimal precision.
getServerType
(package private) int getServerType()
Retrieve the Server type.
- The Server type as an
int
.
getStreamId
(package private) int getStreamId()
Retrieve the unique stream id.
- the unique stream id as an
int
.
getTdsVersion
(package private) int getTdsVersion()
Retrieve the TDS version number.
- The TDS version as an
int
.
putPacket
private void putPacket(int last)
throws IOException
Write the TDS packet to the network.
last
- Set to 1 if this is the last packet else 0.
setBufferSize
(package private) void setBufferSize(int size)
Set the output buffer size
setPacketType
(package private) void setPacketType(byte pktType)
Set the current output packet type.
pktType
- The packet type eg TdsCore.QUERY_PKT.
write
(package private) void write(BigDecimal value)
throws IOException
Write a BigDecimal value to the output stream.
value
- The BigDecimal value to write.
write
(package private) void write(String s)
throws IOException
Write a String object to the output stream.
If the TDS version is >= 7.0 write a UNICODE string otherwise
wrote a translated byte stream.
write
(package private) void write(byte b)
throws IOException
Write a byte to the output stream.
b
- The byte value to write.
write
(package private) void write(byte[] b)
throws IOException
Write an array of bytes to the output stream.
b
- The byte array to write.
write
(package private) void write(byte[] b,
int off,
int len)
throws IOException
Write a partial byte buffer to the output stream.
b
- The byte array buffer.off
- The offset into the byte array.len
- The number of bytes to write.
write
(package private) void write(double f)
throws IOException
Write a double value to the output stream.
f
- The double value to write.
write
(package private) void write(float f)
throws IOException
Write a float value to the output stream.
f
- The float value to write.
write
(package private) void write(int i)
throws IOException
Write an int value to the output stream.
i
- The int value to write.
write
(package private) void write(long l)
throws IOException
Write a long value to the output stream.
l
- The long value to write.
write
(package private) void write(s[] ,
int off,
int len)
throws IOException
Write a char array object to the output stream.
write
(package private) void write(short s)
throws IOException
Write a short value to the output stream.
s
- The short value to write.
writeAscii
(package private) void writeAscii(String s)
throws IOException
Write a String to the output stream as translated bytes.
writeReaderBytes
(package private) void writeReaderBytes(Reader in,
int length)
throws IOException
Copy the contents of a Reader stream to the server as bytes.
NB. Only reliable where the charset is single byte.
in
- The Reader object with the data.length
- The length of the data in bytes.
writeReaderChars
(package private) void writeReaderChars(Reader in,
int length)
throws IOException
Copy the contents of a Reader stream to the server.
in
- The Reader object with the data.length
- The length of the data in characters.
writeStreamBytes
(package private) void writeStreamBytes(InputStream in,
int length)
throws IOException
Copy the contents of an InputStream to the server.
in
- The InputStream to read.length
- The length of the stream.