org.apache.avalon.cornerstone.blocks.masterstore
Class ResettableFileInputStream
java.lang.Object
java.io.InputStream
org.apache.avalon.cornerstone.blocks.masterstore.ResettableFileInputStream
- All Implemented Interfaces:
- Closeable
public class ResettableFileInputStream
- extends InputStream
- Author:
- Federico Barbieri
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ResettableFileInputStream
public ResettableFileInputStream(File file)
throws IOException
- Throws:
IOException
ResettableFileInputStream
public ResettableFileInputStream(String filename)
throws IOException
- Throws:
IOException
ResettableFileInputStream
public ResettableFileInputStream(String filename,
int bufferSize)
throws IOException
- Throws:
IOException
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
- Throws:
IOException
newStream
protected InputStream newStream()
throws IOException
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available
in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] bytes,
int offset,
int length)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
skip
public long skip(long count)
throws IOException
- Overrides:
skip
in class InputStream
- Throws:
IOException
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.