Class Utf32Reader

java.lang.Object
java.io.Reader
com.fasterxml.aalto.in.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.
  • Field Details

    • mConfig

      protected final ReaderConfig mConfig
    • mIn

      protected InputStream mIn
    • mBuffer

      protected byte[] mBuffer
    • mPtr

      protected int mPtr
    • mLength

      protected int mLength
    • mBigEndian

      protected final boolean mBigEndian
    • mSurrogate

      protected char mSurrogate
      Although input is fine with full Unicode set, Java still uses 16-bit chars, so we may have to split high-order chars into surrogate pairs.
    • mCharCount

      protected int mCharCount
      Total read character count; used for error reporting purposes
    • mByteCount

      protected int mByteCount
      Total read byte count; used for error reporting purposes
  • Constructor Details

    • Utf32Reader

      public Utf32Reader(ReaderConfig cfg, InputStream in, byte[] buf, int ptr, int len, boolean isBigEndian)
  • Method Details