public class OpenFileInputStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.io.BufferedInputStream |
m_br |
protected java.io.File |
m_file |
protected java.io.InputStreamReader |
m_fr |
protected PosFileInputStream |
m_inputStream |
protected boolean |
m_isActive |
protected long |
m_mark |
protected long |
m_pos |
protected long |
m_timeout
Time awaiting for next set of data
|
Constructor and Description |
---|
OpenFileInputStream(java.io.File file,
boolean isActive,
long timeout) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this open file input stream.
|
long |
getFilePos()
Get current read position.
|
void |
mark(int readAheadLimit)
Marks the current position in the open file input stream.
|
int |
read(byte[] buffer)
Reads bytes from this open file input stream.
|
int |
read(byte[] buffer,
int offset,
int count)
Reads "count" bytes from the open file input stream starting at the
current read position and stores the bytes read into byte array "buffer"
starting at index "offset".
|
void |
reload() |
void |
reset()
Repositions the stream to the last marked position.
|
long |
skip(long count)
Skips bytes from this file input stream
|
protected PosFileInputStream m_inputStream
protected java.io.BufferedInputStream m_br
protected java.io.InputStreamReader m_fr
protected boolean m_isActive
protected java.io.File m_file
protected long m_mark
protected long m_pos
protected long m_timeout
public OpenFileInputStream(java.io.File file, boolean isActive, long timeout) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void reload() throws java.lang.Exception
java.lang.Exception
public void close() throws java.io.IOException
java.io.IOException
public long getFilePos()
public void mark(int readAheadLimit) throws java.io.IOException
readAheadLimit
- The maximum read-ahead allowed before the
current mark is invalidated.java.io.IOException
public int read(byte[] buffer) throws java.io.IOException
buffer
- The buffer into which the data is read.java.io.IOException
public int read(byte[] buffer, int offset, int count) throws java.io.IOException
buffer
- The buffer into which the data is read.offset
- The index in buffer in which to start storing the bytes
read.count
- The maximum number of bytes to read.java.io.IOException
public void reset() throws java.io.IOException
java.io.IOException
public long skip(long count) throws java.io.IOException
java.io.IOException