net.sourceforge.jtds.ssl
Class TdsTlsInputStream
FilterInputStreamnet.sourceforge.jtds.ssl.TdsTlsInputStream
(package private) class TdsTlsInputStream
extends FilterInputStream
An input stream that filters out TDS headers so they are not returned to
JSSE (which will not recognize them).
$Id: TdsTlsInputStream.java,v 1.5 2005/10/20 09:46:38 alin_sinpalean Exp $- Rob Worsnop
- Mike Hutchinson
(package private) InputStream | bufferStream
|
(package private) int | bytesOutstanding
|
(package private) boolean | pureSSL- False if TLS packets are encapsulated in TDS packets.
|
(package private) byte[] | readBuffer- Temporary buffer used to de-encapsulate inital TLS packets.
|
TdsTlsInputStream(InputStream in)- Constructs a TdsTlsInputStream and bases it on an underlying stream.
|
private void | primeBuffer()- Read in entire TLS record or TDS packet and store the TLS record in the
buffer.
|
int | read(byte[] b, int off, int len)
|
private void | readFully(byte[] b, int off, int len)- Reads
len bytes or throws an IOException if
there aren't that many bytes available.
|
bufferStream
(package private) InputStream bufferStream
bytesOutstanding
(package private) int bytesOutstanding
pureSSL
(package private) boolean pureSSL
False if TLS packets are encapsulated in TDS packets.
readBuffer
(package private) final byte[] readBuffer
Temporary buffer used to de-encapsulate inital TLS packets.
Initial size should be enough for login phase after which no
buffering is required.
TdsTlsInputStream
public TdsTlsInputStream(InputStream in)
Constructs a TdsTlsInputStream and bases it on an underlying stream.
in - the underlying stream
primeBuffer
private void primeBuffer()
throws IOException Read in entire TLS record or TDS packet and store the TLS record in the
buffer. (TDS packets will always contain a TLS record.)
read
public int read(byte[] b,
int off,
int len)
throws IOException
readFully
private void readFully(byte[] b,
int off,
int len)
throws IOException Reads len bytes or throws an IOException if
there aren't that many bytes available.
b - buffer to read intooff - offset in the buffer where to start storinglen - amount of data to read
Generated on June 12 2008