|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
com.vwp.io.ByteArrayReader
public class ByteArrayReader
| Constructor Summary | |
|---|---|
ByteArrayReader(byte[] buf)
Create an ByteArrayReader from the specified array of bytes. |
|
ByteArrayReader(byte[] buf,
int offset,
int length)
Create an ByteArrayReader from the specified array of bytes. |
|
| Method Summary | |
|---|---|
void |
close()
Close the stream. |
void |
mark(int readAheadLimit)
Mark the present position in the stream. |
boolean |
markSupported()
Tell whether this stream supports the mark() operation, which it does. |
int |
read()
Read a single byteacter. |
int |
read(byte[] b,
int off,
int len)
Read byteacters into a portion of an array. |
int |
read(char[] b,
int off,
int len)
|
java.lang.String |
readLine()
Reads all bytes until the next \n |
boolean |
ready()
Tell whether this stream is ready to be read. |
void |
reset()
Reset the stream to the most recent mark, or to the beginning if it has never been marked. |
long |
skip(long n)
Skip bytes. |
| Methods inherited from class java.io.Reader |
|---|
read, read |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteArrayReader(byte[] buf)
buf - Input buffer (not copied)
public ByteArrayReader(byte[] buf,
int offset,
int length)
buf - Input buffer (not copied)offset - Offset of the first byte to readlength - Number of bytes to read| Method Detail |
|---|
public int read()
throws java.io.IOException
read in class java.io.Readerjava.io.IOException - If an I/O error occurs
public java.lang.String readLine()
throws java.io.IOException
java.io.IOException - If an I/O error occurs
public int read(char[] b,
int off,
int len)
read in class java.io.Reader
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
b - Destination bufferoff - Offset at which to start storing byteacterslen - Maximum number of byteacters to read
java.io.IOException - If an I/O error occurs
public long skip(long n)
throws java.io.IOException
skip in class java.io.Readern - The number of byteacters to skip
java.io.IOException - If an I/O error occurs
public boolean ready()
throws java.io.IOException
ready in class java.io.Readerjava.io.IOException - If an I/O error occurspublic boolean markSupported()
markSupported in class java.io.Reader
public void mark(int readAheadLimit)
throws java.io.IOException
mark in class java.io.ReaderreadAheadLimit - Limit on the number of byteacters that
may be read while still preserving the mark. Because the
stream's input comes from a bytearray, there is no actual
limit and this argument is ignored.
java.io.IOException - If an I/O error occurs
public void reset()
throws java.io.IOException
reset in class java.io.Readerjava.io.IOException - If an I/O error occurspublic void close()
close in interface java.io.Closeableclose in class java.io.Reader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||