|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.norther.tammi.acorn.io.CollectorInputStream
public class CollectorInputStream
An input stream wrapper collecting read input into its internal buffer.
| Constructor Summary | |
|---|---|
CollectorInputStream(InputStream in)
Constructs a new collector input stream. |
|
| Method Summary | |
|---|---|
int |
available()
Returns the number of bytes available. |
void |
close()
Closes the stream. |
int |
getByteCount()
Gets the number of collected bytes. |
byte[] |
getBytes()
Gets the byte buffer. |
void |
mark(int readlimit)
Marks the current position. |
boolean |
markSupported()
Checks whether mark is supported. |
int |
read()
Reads the next byte. |
int |
read(byte[] bb)
Reads some number of bytes. |
int |
read(byte[] bb,
int off,
int len)
Reads the specified number of bytes into a buffer. |
void |
reset()
Resets the stream. |
void |
reset(InputStream in)
Resets the collector for a new stream. |
long |
skip(long n)
Skips the given number of bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectorInputStream(InputStream in)
in - an input stream.| Method Detail |
|---|
public int available()
throws IOException
available in class InputStreamIOException - on I/O errors.
public int read()
throws IOException
read in class InputStreamIOException - for I/O errors.
public int read(byte[] bb)
throws IOException
read in class InputStreambb - a buffer.
IOException - on error.
public int read(byte[] bb,
int off,
int len)
throws IOException
read in class InputStreambb - a buffer.off - an offset.len - the number of bytes to read.
IOException - for I/O errors.public void mark(int readlimit)
mark in class InputStreamreadlimit - an invalidation limit.public boolean markSupported()
markSupported in class InputStream
public void reset()
throws IOException
reset in class InputStreamIOException - for I/O errors.
public long skip(long n)
throws IOException
skip in class InputStreamn - the number of bytes to skip.
IOException - for I/O errors.
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException - for I/O errors.public void reset(InputStream in)
in - a new input stream.public int getByteCount()
public byte[] getBytes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||