| java.lang.Object |
| ↳ |
java.io.Reader |
| |
↳ |
com.google.gdata.util.io.base.UnicodeReader |
Class Overview
Generic Unicode text reader, which uses a BOM (Byte Order Mark) to identify
the encoding to be used. This also has the side effect of removing the BOM
from the input stream (when present).
Summary
|
[Expand]
Inherited Constants |
From class
java.io.Reader
|
|
[Expand]
Inherited Fields |
From class
java.io.Reader
|
protected
Object |
lock |
|
|
private
char[] |
skipBuffer |
|
|
| Public Constructors |
|
|
UnicodeReader(InputStream in, String defaultEnc)
|
|
[Expand]
Inherited Methods |
From class
java.io.Reader
|
abstract
void
|
close()
|
|
void
|
mark(int arg0)
|
|
boolean
|
markSupported()
|
|
int
|
read()
|
|
abstract
int
|
read(char[] arg0, int arg1, int arg2)
|
|
int
|
read(CharBuffer arg0)
|
|
int
|
read(char[] arg0)
|
|
boolean
|
ready()
|
|
void
|
reset()
|
|
long
|
skip(long arg0)
|
|
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
java.io.Closeable
|
From interface
java.lang.Readable
|
abstract
int
|
read(CharBuffer arg0)
|
|
Constants
private
static
final
int
BOM_SIZE
Constant Value:
4
(0x00000004)
Fields
private
final
String
defaultEnc
private
final
InputStreamReader
internalInputStreamReader
Public Constructors
public
UnicodeReader
(InputStream in, String defaultEnc)
Parameters
| in
| Input stream |
| defaultEnc
| Default encoding (used only if BOM is not found) or
null to use system default |
Throws
| IOException
| if an I/O error occurs
|
Public Methods
public
String
getDefaultEncoding
()
public
String
getEncoding
()
public
int
read
(char[] cbuf, int off, int len)