Class UTF8Reader
java.lang.Object
java.io.Reader
de.tomatengames.util.io.UTF8Reader
- All Implemented Interfaces:
Closeable, AutoCloseable, Readable
A
Reader that reads bytes from an InputStream and decodes them to characters using UTF-8.
This reader is unbuffered, except for surrogate characters.
Each read operation may cause bytes to be read from the underlying InputStream.
This implementation supports mark(int) if and only if the underlying InputStream supports InputStream.mark(int).
- Since:
- 1.7
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Reader
nullReader, of, read, read, readAllAsString, readAllLines, ready, skip, transferTo
-
Constructor Details
-
UTF8Reader
Creates a newUTF8Reader.- Parameters:
in- TheInputStreamthat backs this reader. Notnull.
-
-
Method Details
-
read
- Overrides:
readin classReader- Throws:
IOException
-
read
- Specified by:
readin classReader- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classReader
-
mark
- Overrides:
markin classReader- Throws:
IOException
-
reset
- Overrides:
resetin classReader- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-