Package com.fasterxml.jackson.core.io
Class UTF32Reader
- java.lang.Object
-
- java.io.Reader
-
- com.fasterxml.jackson.core.io.UTF32Reader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Readable
public class UTF32Reader extends java.io.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, java.io.InputStream in, byte[] buf, int ptr, int len, boolean isBigEndian)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
read()
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 caseint
read(char[] cbuf, int start, int len)
-
-
-
Constructor Detail
-
UTF32Reader
public UTF32Reader(IOContext ctxt, java.io.InputStream in, byte[] buf, int ptr, int len, boolean isBigEndian)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classjava.io.Reader
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
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 case- Overrides:
read
in classjava.io.Reader
- Throws:
java.io.IOException
-
read
public int read(char[] cbuf, int start, int len) throws java.io.IOException
- Specified by:
read
in classjava.io.Reader
- Throws:
java.io.IOException
-
-