|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Reader
com.tangosol.io.Utf8Reader
public class Utf8Reader
A Utf8Reader is used to read character data from an underlying stream.
Field Summary |
---|
Fields inherited from class java.io.Reader |
---|
lock |
Constructor Summary | |
---|---|
Utf8Reader(byte[] ab)
Construct a Utf8Reader that reads the input from a byte array. |
|
Utf8Reader(InputStream stream)
Construct a Utf8Reader that reads the input from an InputStream. |
Method Summary | |
---|---|
void |
close()
Close the stream. |
void |
mark(int cchLimit)
Mark the present position in the stream. |
boolean |
markSupported()
Tell whether this stream supports the mark() operation. |
int |
read()
Read a single character. |
int |
read(char[] ach)
Read characters into an array. |
int |
read(char[] ach,
int of,
int cch)
Read characters into a portion of an array. |
boolean |
ready()
Tell whether this stream is ready to be read. |
void |
reset()
Reset the stream. |
long |
skip(long cch)
Skip characters. |
Methods inherited from class java.io.Reader |
---|
read |
Constructor Detail |
---|
public Utf8Reader(byte[] ab)
public Utf8Reader(InputStream stream)
stream
- the underlying stream to write toMethod Detail |
---|
public int read() throws IOException
Subclasses that intend to support efficient single-character input should override this method.
read
in class Reader
IOException
- If an I/O error occurspublic int read(char[] ach) throws IOException
read
in class Reader
ach
- Destination buffer
IOException
- If an I/O error occurspublic int read(char[] ach, int of, int cch) throws IOException
read
in class Reader
ach
- array of characters to read intoof
- offset into the array at which to start storing characterscch
- maximum number of characters to read
IOException
- If an I/O error occurspublic long skip(long cch) throws IOException
skip
in class Reader
cch
- The number of characters to skip
IllegalArgumentException
- If n
is negative.
IOException
- If an I/O error occurspublic boolean ready() throws IOException
ready
in class Reader
IOException
- If an I/O error occurspublic boolean markSupported()
markSupported
in class Reader
public void mark(int cchLimit) throws IOException
mark
in class Reader
cchLimit
- Limit on the number of characters that may be
read while still preserving the mark. After
reading this many characters, attempting to
reset the stream may fail.
IOException
- If the stream does not support mark(),
or if some other I/O error occurspublic void reset() throws IOException
reset
in class Reader
IOException
- If the stream has not been marked,
or if the mark has been invalidated,
or if the stream does not support reset(),
or if some other I/O error occurspublic void close() throws IOException
close
in interface Closeable
close
in class Reader
IOException
- If an I/O error occurs
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |