Package com.fasterxml.jackson.core.io
Class UTF32Reader
- java.lang.Object
-
- java.io.Reader
-
- com.fasterxml.jackson.core.io.UTF32Reader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
public class UTF32Reader extends Reader
Since JDK does not come with UTF-32/UCS-4, let's implement a simple decoder to use.
-
-
Constructor Summary
Constructors Constructor Description UTF32Reader(IOContext ctxt, InputStream in, byte[] buf, int ptr, int len, boolean isBigEndian)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread()Although this method is implemented by the base class, AND it should never be called by main code, let's still implement it bit more efficiently just in caseintread(char[] cbuf, int start, int len)-
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
UTF32Reader
public UTF32Reader(IOContext ctxt, InputStream in, byte[] buf, int ptr, int len, boolean isBigEndian)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
read
public int read() throws IOExceptionAlthough this method is implemented by the base class, AND it should never be called by main code, let's still implement it bit more efficiently just in case- Overrides:
readin classReader- Throws:
IOException
-
read
public int read(char[] cbuf, int start, int len) throws IOException- Specified by:
readin classReader- Throws:
IOException
-
-