com.sibvisions.util.io
Class ShadowCopyInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.sibvisions.util.io.ShadowCopyInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class ShadowCopyInputStream
- extends java.io.FilterInputStream
The ShadowCopyInputStream
is an InputStream
wrapper that copies
every read byte to an internal cache.
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary |
ShadowCopyInputStream(java.io.InputStream pStream)
Creates a new instance of ShadowCopyInputStream . |
Method Summary |
void |
clear()
Clears the internal cache. |
byte[] |
dump()
Gets the read bytes. |
int |
read()
|
int |
read(byte[] pContent,
int pOffset,
int pLength)
|
Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShadowCopyInputStream
public ShadowCopyInputStream(java.io.InputStream pStream)
- Creates a new instance of
ShadowCopyInputStream
.
- Parameters:
pStream
- the wrapped stream
read
public int read()
throws java.io.IOException
-
- Overrides:
read
in class java.io.FilterInputStream
- Throws:
java.io.IOException
read
public int read(byte[] pContent,
int pOffset,
int pLength)
throws java.io.IOException
-
- Overrides:
read
in class java.io.FilterInputStream
- Throws:
java.io.IOException
dump
public byte[] dump()
- Gets the read bytes.
- Returns:
- the bytes
clear
public void clear()
- Clears the internal cache.
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.