org.apache.avalon.cornerstone.blocks.masterstore
Class ResettableFileInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.apache.avalon.cornerstone.blocks.masterstore.ResettableFileInputStream

public class ResettableFileInputStream
extends java.io.InputStream

Author:
Federico Barbieri

Field Summary
protected static int DEFAULT_BUFFER_SIZE
           
protected  int m_bufferSize
           
protected  java.lang.String m_filename
           
protected  java.io.InputStream m_inputStream
           
protected  boolean m_isMarkSet
           
protected  long m_mark
           
protected  long m_position
           
 
Constructor Summary
ResettableFileInputStream(java.io.File file)
           
ResettableFileInputStream(java.lang.String filename)
           
ResettableFileInputStream(java.lang.String filename, int bufferSize)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
protected  java.io.InputStream newStream()
           
 int read()
           
 int read(byte[] bytes, int offset, int length)
           
 void reset()
           
 long skip(long count)
           
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

protected static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

m_filename

protected final java.lang.String m_filename

m_bufferSize

protected int m_bufferSize

m_inputStream

protected java.io.InputStream m_inputStream

m_position

protected long m_position

m_mark

protected long m_mark

m_isMarkSet

protected boolean m_isMarkSet
Constructor Detail

ResettableFileInputStream

public ResettableFileInputStream(java.io.File file)
                          throws java.io.IOException

ResettableFileInputStream

public ResettableFileInputStream(java.lang.String filename)
                          throws java.io.IOException

ResettableFileInputStream

public ResettableFileInputStream(java.lang.String filename,
                                 int bufferSize)
                          throws java.io.IOException
Method Detail

mark

public void mark(int readLimit)

markSupported

public boolean markSupported()

reset

public void reset()
           throws java.io.IOException
Throws:
java.io.IOException

newStream

protected java.io.InputStream newStream()
                                 throws java.io.IOException
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] bytes,
                int offset,
                int length)
         throws java.io.IOException
Throws:
java.io.IOException

skip

public long skip(long count)
          throws java.io.IOException
Throws:
java.io.IOException


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.