LoggingSocketpublic 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 void | close()
if (null != _loggingOutputStream) {
_loggingOutputStream.flush();
_loggingOutputStream.close();
}
if (null != _loggingInputStream) {
_loggingInputStream.close();
}
| public java.io.InputStream | getInputStream()
if (null == _loggingInputStream) {
_loggingInputStream = new LoggingInputStream(super.getInputStream(), _fileName);
}
return _loggingInputStream;
| public java.io.OutputStream | getOutputStream()
if (null == _loggingOutputStream) {
_loggingOutputStream = new LoggingOutputStream(super.getOutputStream(), _fileName);
}
return _loggingOutputStream;
|
|