net.sourceforge.jtds.ssl

Class 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:

Version:
$Id: TdsTlsOutputStream.java,v 1.4 2005/04/28 14:29:31 alin_sinpalean Exp $
Authors:
Rob Worsnop
Mike Hutchinson

Field Summary

private List
bufferedRecords
Used for holding back CKE, CCS and FIN records.
private int
totalSize

Constructor Summary

TdsTlsOutputStream(OutputStream out)
Constructs a TdsTlsOutputStream based on an underlying output stream.

Method Summary

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)

Field Details

bufferedRecords

private final List bufferedRecords
Used for holding back CKE, CCS and FIN records.

totalSize

private int totalSize

Constructor Details

TdsTlsOutputStream

(package private)  TdsTlsOutputStream(OutputStream out)
Constructs a TdsTlsOutputStream based on an underlying output stream.
Parameters:
out - the underlying output stream

Method Details

deferRecord

private void deferRecord(record[] ,
                         int len)
Holds back a record for batched transmission.
Parameters:
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).
Parameters:
b - the TLS record
len - the length of the TLS record

write

public void write(byte[] b,
                  int off,
                  int len)
            throws IOException

Generated on June 12 2008