ice.util.io
Class MarkerInputStream
java.lang.Object
java.io.InputStream
ice.util.io.MarkerInputStream
- public class MarkerInputStream
- extends InputStream
- Since:
- 1.5
- Version:
- 1.5.1
- Author:
- Jack van Ooststroom
|
Method Summary |
int |
available()
|
void |
close()
|
void |
mark()
Marks the current position in this input stream. |
void |
mark(int readLimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] bytes)
|
int |
read(byte[] bytes,
int offset,
int length)
|
void |
reset()
Repositions this stream to the position at the time the mark method
was last called on this input stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MarkerInputStream
public MarkerInputStream(LazyCachedInputStream lazyCachedInputStream)
available
public int available()
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Throws:
IOException
mark
public void mark()
Marks the current position in this input stream. A subsequent call to
the reset() method repositions this stream at the last
marked position so that subsequent reads re-read the same bytes.
Using this method, there is no read limit!
- Since:
- 1.5.1
- See Also:
mark(int),
reset()
mark
public void mark(int readLimit)
markSupported
public boolean markSupported()
read
public int read()
throws IOException
- Throws:
IOException
read
public int read(byte[] bytes)
throws IOException
- Throws:
IOException
read
public int read(byte[] bytes,
int offset,
int length)
throws IOException
- Throws:
IOException
reset
public void reset()
throws IOException
Repositions this stream to the position at the time the mark method
was last called on this input stream.
If either of the methods mark() and
mark(int) have not been called since the stream was created,
or the number of bytes read from the stream since mark(int)
was last called is larger than the argument to mark(int) at
that last call, then an IOException is be thrown.
- Throws:
IOException - if this stream has not been marked or if the mark
has been invalidated.- Since:
- 1.5.1
- See Also:
mark(),
mark(int)