org.backsource.utils.io
Class FileCachedStream

java.lang.Object
  extended byorg.backsource.utils.io.ByteCachedStream
      extended byorg.backsource.utils.io.FileCachedStream
All Implemented Interfaces:
CachedStream

public class FileCachedStream
extends ByteCachedStream

A StreamCache that cached data in temporary files.

Version:
$Revision: 1.1.1.1 $
Author:
Peter Antman

Field Summary
protected static java.lang.String TMP_PREFIX
           
protected static java.lang.String TMP_SUFIX
           
 
Constructor Summary
FileCachedStream()
           
 
Method Summary
 CachedInputStream getInputStream(CachedOutputStream cout)
          Get a rewindable input stream from the given CachedOutputStream.
 CachedOutputStream getOutputStream()
          Get a CachedOutputStream.
 
Methods inherited from class org.backsource.utils.io.ByteCachedStream
getInputStream, getProperty, rewind, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TMP_PREFIX

protected static final java.lang.String TMP_PREFIX
See Also:
Constant Field Values

TMP_SUFIX

protected static final java.lang.String TMP_SUFIX
See Also:
Constant Field Values
Constructor Detail

FileCachedStream

public FileCachedStream()
Method Detail

getOutputStream

public CachedOutputStream getOutputStream()
                                   throws java.io.IOException
Get a CachedOutputStream.

The typical usecase for this is to later use it to get a CachedInputStream from it.

Specified by:
getOutputStream in interface CachedStream
Overrides:
getOutputStream in class ByteCachedStream
Throws:
java.io.IOException

getInputStream

public CachedInputStream getInputStream(CachedOutputStream cout)
                                 throws java.io.IOException
Get a rewindable input stream from the given CachedOutputStream.

Specified by:
getInputStream in interface CachedStream
Overrides:
getInputStream in class ByteCachedStream
Throws:
java.io.IOException


Copyright © 2000-2004 Backsource. All Rights Reserved.