FileDocCategorySizeDatePackage
CompressingSocket.javaAPI DocExample1489Thu Nov 08 00:23:26 GMT 2001com.ora.rmibook.chapter2.sockets

CompressingSocket

public class CompressingSocket extends Socket

Fields Summary
private InputStream
_compressingInputStream
private OutputStream
_compressingOutputStream
Constructors Summary
public CompressingSocket()

    
public CompressingSocket(String host, int port)

        super (host, port);
    
Methods Summary
public synchronized voidclose()

        if (null != _compressingOutputStream) {
            _compressingOutputStream.flush();
            _compressingOutputStream.close();
        }
        if (null != _compressingInputStream) {
            _compressingInputStream.close();
        }
    
public java.io.InputStreamgetInputStream()

        if (null == _compressingInputStream) {
            InputStream originalInputStream = super.getInputStream();

            _compressingInputStream = new CompressingInputStream(originalInputStream);
        }
        return _compressingInputStream;
    
public java.io.OutputStreamgetOutputStream()

        if (null == _compressingOutputStream) {
            OutputStream originalOutputStream = super.getOutputStream();

            _compressingOutputStream = new CompressingOutputStream(originalOutputStream);
        }
        return _compressingOutputStream;