Class JsonReader


  • final class JsonReader
    extends java.lang.Object
    • Field Detail

      • WHITESPACE

        private static final boolean[] WHITESPACE
      • tokenStart

        private int tokenStart
      • currentIndex

        private int currentIndex
      • last

        private byte last
      • length

        protected int length
      • tmp

        private final char[] tmp
      • buffer

        private final byte[] buffer
      • UTF_8

        private static final java.nio.charset.Charset UTF_8
    • Constructor Detail

      • JsonReader

        private JsonReader​(char[] tmp,
                           byte[] buffer,
                           int length)
      • JsonReader

        public JsonReader​(byte[] buffer,
                          int length)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • JsonReader

        public JsonReader​(byte[] buffer,
                          int length,
                          char[] tmp)
                   throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • length

        public int length()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • read

        public byte read()
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • isEndOfStream

        boolean isEndOfStream()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • last

        public final byte last()
      • getTokenStart

        public final int getTokenStart()
      • getCurrentIndex

        public final int getCurrentIndex()
      • readNumber

        public final char[] readNumber()
      • readString

        public final java.lang.String readString()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • hexToInt

        private static int hexToInt​(byte value)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • wasWhiteSpace

        private boolean wasWhiteSpace()
      • getNextToken

        public final byte getNextToken()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • positionInStream

        public final long positionInStream()
      • wasNull

        public final boolean wasNull()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • wasTrue

        public final boolean wasTrue()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • wasFalse

        public final boolean wasFalse()
                               throws java.io.IOException
        Throws:
        java.io.IOException