FileDocCategorySizeDatePackage
LoggingSocket.javaAPI DocExample1392Thu Nov 08 00:23:28 GMT 2001com.ora.rmibook.chapter2.sockets

LoggingSocket

public class LoggingSocket extends Socket

Fields Summary
private LoggingInputStream
_loggingInputStream
private LoggingOutputStream
_loggingOutputStream
private String
_fileName
Constructors Summary
public LoggingSocket(String fileName)

        _fileName = fileName;
    
public LoggingSocket(String host, int port, String fileName)

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

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

        if (null == _loggingInputStream) {
            _loggingInputStream = new LoggingInputStream(super.getInputStream(), _fileName);
        }
        return _loggingInputStream;
    
public java.io.OutputStreamgetOutputStream()

        if (null == _loggingOutputStream) {
            _loggingOutputStream = new LoggingOutputStream(super.getOutputStream(), _fileName);
        }
        return _loggingOutputStream;