You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



All Packages  This Package  Class Hierarchy  Class Search  Index

Class calypso.util.CacheInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----calypso.util.CacheInputStream

This is the private class that is used for reading data out of the file underlying a CacheOutputStream. This is used only when a file is being used for cacheing, not when the memory buffer is being used. Mainly this just passes the various InputStream methods along to the underlying file stream; but it adds one other thing, which is that as soon as the underlying file stream hits eof, the underlying file is deleted (by calling CacheOutputStream.discardBuffer().)


class  CacheInputStream
     extends java.io.InputStream
{
          // Fields 2
     protected InputStream stream;
     protected CacheOutputStream stream_cache;

          // Constructors 1
     CacheInputStream(CacheOutputStream, InputStream);

          // Methods 11
     public int available() throws IOException;
     public void close() throws IOException;
     protected synchronized void discardBackingStore();
     protected void finalize();
     public void mark(int);
     public boolean markSupported();
     public int read() throws IOException;
     public int read(byte[]) throws IOException;
     public int read(byte[], int, int) throws IOException;
     public void reset() throws IOException;
     public long skip(long) throws IOException;
}



Fields


stream_cache

   protected CacheOutputStream stream_cache


stream

   protected InputStream stream



Constructors


CacheInputStream

   CacheInputStream(CacheOutputStream sc, 
                    InputStream s) 



Methods


available

   public int available()  throws IOException
Overrides:
available in class InputStream


close

   public void close()  throws IOException
Overrides:
close in class InputStream


mark

   public void mark(int i) 
Overrides:
mark in class InputStream


markSupported

   public boolean markSupported() 
Overrides:
markSupported in class InputStream


read

   public int read()  throws IOException
Overrides:
read in class InputStream


read

   public int read(byte[] b)  throws IOException
Overrides:
read in class InputStream


read

   public int read(byte[] b, 
                   int start, 
                   int length)  throws IOException
Overrides:
read in class InputStream


reset

   public void reset()  throws IOException
Overrides:
reset in class InputStream


skip

   public long skip(long i)  throws IOException
Overrides:
skip in class InputStream


discardBackingStore

   protected synchronized void discardBackingStore() 


finalize

   protected void finalize() 
Overrides:
finalize in class Object


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4