ch.randelshofer.io
Class CopyingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
ch.randelshofer.io.CopyingInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class CopyingInputStream
- extends java.io.FilterInputStream
Copies all data that has been read through this input stream into an
OutputStream.
- Version:
- 1.0.1 2008-08-18 Skip method did not return negative number in case
of EOF.
1.0 December 28, 2006 Created.
- Author:
- Werner Randelshofer
| Fields inherited from class java.io.FilterInputStream |
in |
|
Constructor Summary |
CopyingInputStream(java.io.InputStream in,
java.io.OutputStream out)
Creates a new instance. |
| Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CopyingInputStream
public CopyingInputStream(java.io.InputStream in,
java.io.OutputStream out)
- Creates a new instance.
getCopyStream
public java.io.OutputStream getCopyStream()
setCopyStream
public void setCopyStream(java.io.OutputStream out)
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read in class java.io.FilterInputStream
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Overrides:
read in class java.io.FilterInputStream
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Overrides:
skip in class java.io.FilterInputStream
- Throws:
java.io.IOException