|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
org.marketcetera.util.unicode.UnicodeInputStreamReader
public class UnicodeInputStreamReader
A variation of InputStreamReader that is BOM-aware. It can
operate in any of the following modes:
| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
UnicodeInputStreamReader(InputStream stream)
Creates a new reader over the given stream that uses the default JVM charset. |
|
UnicodeInputStreamReader(InputStream stream,
DecodingStrategy decodingStrategy)
Creates a new reader over the given stream that normally uses the charset associated with a matching signature among those of the given decoding strategy. |
|
UnicodeInputStreamReader(InputStream stream,
SignatureCharset requestedSignatureCharset)
Creates a new reader over the given stream that normally assumes the given signature is present and its associated charset should be used. |
|
| Method Summary | |
|---|---|
void |
close()
|
DecodingStrategy |
getDecodingStrategy()
Returns the receiver's decoding strategy. |
SignatureCharset |
getRequestedSignatureCharset()
Returns the receiver's requested signature/charset. |
SignatureCharset |
getSignatureCharset()
Returns the receiver's actual signature/charset (that is, the one in use to decode the stream). |
void |
mark(int readAheadLimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(char[] cbuf)
|
int |
read(char[] cbuf,
int off,
int len)
|
int |
read(CharBuffer target)
|
boolean |
ready()
|
long |
skip(long n)
|
| Methods inherited from class java.io.Reader |
|---|
reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnicodeInputStreamReader(InputStream stream)
stream - The stream.
public UnicodeInputStreamReader(InputStream stream,
SignatureCharset requestedSignatureCharset)
stream - The stream.requestedSignatureCharset - The signature/charset. It may
be null to use the default JVM charset.
public UnicodeInputStreamReader(InputStream stream,
DecodingStrategy decodingStrategy)
stream - The stream.decodingStrategy - The decoding strategy. It may be null
to use the default JVM charset.| Method Detail |
|---|
public int read(CharBuffer target)
throws IOException
read in interface Readableread in class ReaderIOException
public int read()
throws IOException
read in class ReaderIOException
public int read(char[] cbuf)
throws IOException
read in class ReaderIOException
public int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOException
public long skip(long n)
throws IOException
skip in class ReaderIOException
public boolean ready()
throws IOException
ready in class ReaderIOExceptionpublic boolean markSupported()
markSupported in class Reader
public void mark(int readAheadLimit)
throws IOException
mark in class ReaderIOException
public void close()
throws IOException
close in interface Closeableclose in class ReaderIOExceptionpublic DecodingStrategy getDecodingStrategy()
public SignatureCharset getRequestedSignatureCharset()
public SignatureCharset getSignatureCharset()
throws IOException
IOException - Thrown if an I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||