org.backsource.utils.io
Class CachedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
org.backsource.utils.io.CachedInputStream
- Direct Known Subclasses:
- ByteCachedInputStream, DOMCachedInputStream, FileCachedInputStream
- public abstract class CachedInputStream
- extends java.io.BufferedInputStream
This is an InputStream that reads from cached data it will get
from a CachedOutputStream.
The stream is therefore possible to reuse, after rewind has
been invoked.
To be able to use these cinds of input stream with external API:s, such as the apache JAXP imlementation, the close method does nothing. To really close the stream use close(boolean).
- Version:
- $Revision: 1.1.1.1 $
- Author:
- Peter Antman
| Fields inherited from class java.io.BufferedInputStream |
buf, count, marklimit, markpos, pos |
| Fields inherited from class java.io.FilterInputStream |
in |
|
Method Summary |
void |
close()
Does not close stream, to close an CachedInputStream use close(true). |
void |
close(boolean reallyClose)
Close the input stream if argument is true. |
abstract void |
rewind()
rewind the cached input stream so that next read starts from the beginning. |
| Methods inherited from class java.io.BufferedInputStream |
available, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.io.FilterInputStream |
read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachedInputStream
public CachedInputStream(java.io.InputStream is)
close
public void close()
throws java.io.IOException
- Does not close stream, to close an CachedInputStream use close(true).
- Throws:
java.io.IOException
close
public void close(boolean reallyClose)
throws java.io.IOException
- Close the input stream if argument is true.
- Throws:
java.io.IOException
rewind
public abstract void rewind()
throws java.io.IOException
- rewind the cached input stream so that next read starts from the beginning.
- Throws:
java.io.IOException
Copyright © 2000-2004 Backsource. All Rights Reserved.