org.netbeans.lib.cvsclient.util
Class LoggedDataInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byorg.netbeans.lib.cvsclient.util.LoggedDataInputStream

public class LoggedDataInputStream
extends java.io.FilterInputStream

This input stream worked exactly like the normal DataInputStream except that it logs anything read to a file


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
LoggedDataInputStream(java.io.InputStream in)
          Construct a logged stream using the specified underlying stream
 
Method Summary
 void close()
          Closes this input stream and releases any system resources associated with the stream.
 java.io.InputStream getUnderlyingStream()
           
 int read(byte[] b)
          Reads up to byte.length bytes of data from this input stream into an array of bytes.
 int read(byte[] b, int off, int len)
          Reads up to len bytes of data from this input stream into an array of bytes
 byte readByte()
          Read a single byte from this stream
 java.lang.String readLine()
          Read a line (up to the newline character) from the stream, logging it too
 void setUnderlyingStream(java.io.InputStream is)
           
 
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggedDataInputStream

public LoggedDataInputStream(java.io.InputStream in)
Construct a logged stream using the specified underlying stream

Parameters:
in - the stream
Method Detail

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Read a line (up to the newline character) from the stream, logging it too

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes this input stream and releases any system resources associated with the stream.

Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Reads up to byte.length bytes of data from this input stream into an array of bytes.

Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Reads up to len bytes of data from this input stream into an array of bytes

Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Read a single byte from this stream

Throws:
java.io.IOException

getUnderlyingStream

public java.io.InputStream getUnderlyingStream()

setUnderlyingStream

public void setUnderlyingStream(java.io.InputStream is)


Built on February 19 2008.  |  Portions Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.