org.apache.james.mailrepository.filepair
Class ResettableFileInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--org.apache.james.mailrepository.filepair.ResettableFileInputStream

public class ResettableFileInputStream
extends InputStream

Author:
Federico Barbieri

Field Summary
protected static int DEFAULT_BUFFER_SIZE
           
protected  int m_bufferSize
           
protected  String m_filename
           
protected  InputStream m_inputStream
           
protected  boolean m_isMarkSet
           
protected  long m_mark
           
protected  long m_position
           
 
Constructor Summary
ResettableFileInputStream(File file)
           
ResettableFileInputStream(String filename)
           
ResettableFileInputStream(String filename, int bufferSize)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
protected  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 String m_filename

m_bufferSize

protected int m_bufferSize

m_inputStream

protected 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(File file)
                          throws IOException

ResettableFileInputStream

public ResettableFileInputStream(String filename)
                          throws IOException

ResettableFileInputStream

public ResettableFileInputStream(String filename,
                                 int bufferSize)
                          throws IOException
Method Detail

mark

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

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

reset

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

newStream

protected InputStream newStream()
                         throws IOException
IOException

available

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

close

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

read

public int read()
         throws IOException
Specified by:
read in class InputStream
IOException

read

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

skip

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


"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."