net.sourceforge.jtds.ssl
Class TdsTlsOutputStream
FilterOutputStream
net.sourceforge.jtds.ssl.TdsTlsOutputStream
(package private) class TdsTlsOutputStream
extends FilterOutputStream
An output stream that mediates between JSSE and the DB server.
SQL Server 2000 has the following requirements:
- All handshake records are delivered in TDS packets.
- The "Client Key Exchange" (CKE), "Change Cipher Spec" (CCS) and
"Finished" (FIN) messages are to be submitted in the delivered in both
the same TDS packet and the same TCP packet.
- From then on TLS/SSL records should be transmitted as normal -- the
TDS packet is part of the encrypted application data.
$Id: TdsTlsOutputStream.java,v 1.4 2005/04/28 14:29:31 alin_sinpalean Exp $- Rob Worsnop
- Mike Hutchinson
TdsTlsOutputStream(OutputStream out) - Constructs a TdsTlsOutputStream based on an underlying output stream.
|
private void | deferRecord(record[] , int len) - Holds back a record for batched transmission.
|
void | flush()
|
private void | flushBufferedRecords() - Transmits the buffered batch of records.
|
(package private) void | putTdsPacket(byte[] b, int len) - Write a TDS packet containing the TLS record(s).
|
void | write(byte[] b, int off, int len)
|
bufferedRecords
private final List bufferedRecords
Used for holding back CKE, CCS and FIN records.
totalSize
private int totalSize
TdsTlsOutputStream
(package private) TdsTlsOutputStream(OutputStream out)
Constructs a TdsTlsOutputStream based on an underlying output stream.
out
- the underlying output stream
deferRecord
private void deferRecord(record[] ,
int len)
Holds back a record for batched transmission.
len
- the length of the TLS record to buffer
flush
public void flush()
throws IOException
flushBufferedRecords
private void flushBufferedRecords()
throws IOException
Transmits the buffered batch of records.
putTdsPacket
(package private) void putTdsPacket(byte[] b,
int len)
throws IOException
Write a TDS packet containing the TLS record(s).
b
- the TLS recordlen
- the length of the TLS record
write
public void write(byte[] b,
int off,
int len)
throws IOException
Generated on September 18 2009