org.backsource.utils.io
Class ByteCachedInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byjava.io.BufferedInputStream
              extended byorg.backsource.utils.io.CachedInputStream
                  extended byorg.backsource.utils.io.ByteCachedInputStream

public class ByteCachedInputStream
extends CachedInputStream

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.

Version:
$Revision: 1.1.1.1 $
Author:
Peter Antman

Field Summary
 
Fields inherited from class java.io.BufferedInputStream
buf, count, marklimit, markpos, pos
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ByteCachedInputStream(byte[] data)
           
ByteCachedInputStream(ByteCachedOutputStream cout)
          Get a CachedInputStream from the CachedOutputStream.
 
Method Summary
 void rewind()
          rewind the cached input stream so that next read starts from the beginning.
 
Methods inherited from class org.backsource.utils.io.CachedInputStream
close, close
 
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
 

Constructor Detail

ByteCachedInputStream

public ByteCachedInputStream(ByteCachedOutputStream cout)
                      throws java.io.IOException
Get a CachedInputStream from the CachedOutputStream.


ByteCachedInputStream

public ByteCachedInputStream(byte[] data)
                      throws java.io.IOException
Method Detail

rewind

public void rewind()
            throws java.io.IOException
Description copied from class: CachedInputStream
rewind the cached input stream so that next read starts from the beginning.

Specified by:
rewind in class CachedInputStream
Throws:
java.io.IOException


Copyright © 2000-2004 Backsource. All Rights Reserved.