Package net.solarnetwork.io
Class UnicodeReader
java.lang.Object
java.io.Reader
net.solarnetwork.io.UnicodeReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
Reader that can detect a Unicode BOM.
Adapted from Google Data API.
- Since:
- 1.35
- Version:
- 1.0
- Author:
- matt
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionUnicodeReader(InputStream in, String defaultEncoding) Construct UnicodeReader. -
Method Summary
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, read, ready, reset, skip, transferTo
-
Constructor Details
-
UnicodeReader
Construct UnicodeReader.- Parameters:
in- Input stream.defaultEncoding- Default encoding to be used if BOM is not found, ornullto use system default encoding.- Throws:
IOException- If an I/O error occurs.
-
-
Method Details
-
getEncoding
-
read
- Specified by:
readin classReader- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-