模块 org.redkale

类 JsonByteBufferReader


  • public class JsonByteBufferReader
    extends JsonReader
    以ByteBuffer为数据载体的JsonReader
    只支持UTF-8格式

    详情见: https://redkale.org

    作者:
    zhangjx
    • 构造器详细资料

      • JsonByteBufferReader

        protected JsonByteBufferReader​(ByteBuffer... buffers)
    • 方法详细资料

      • nextByte

        protected byte nextByte()
      • nextChar

        protected final char nextChar()
        读取下一个字符, 不跳过空白字符
        覆盖:
        nextChar 在类中 JsonReader
        返回:
        有效字符或空白字符
      • backChar

        protected final void backChar​(char ch)
        回退最后读取的字符
        覆盖:
        backChar 在类中 JsonReader
        参数:
        ch - 回退的字符
      • readObjectB

        public final String readObjectB​(Class clazz)
        判断下一个非空白字符是否为{
        覆盖:
        readObjectB 在类中 JsonReader
        参数:
        clazz - 类名
        返回:
        SIGN_NOLENGTH 或 SIGN_NULL
      • readArrayB

        public final int readArrayB​(DeMember member,
                                    byte[] typevals,
                                    Decodeable decoder)
        判断下一个非空白字符是否为[
        覆盖:
        readArrayB 在类中 JsonReader
        参数:
        member - DeMember
        typevals - byte[]
        decoder - Decodeable
        返回:
        SIGN_NOLENGTH 或 SIGN_NULL
      • readBlank

        public final void readBlank()
        判断下一个非空白字符是否:
        覆盖:
        readBlank 在类中 JsonReader
      • readString

        public final String readString()
        读取字符串, 必须是"或者'包围的字符串值
        覆盖:
        readString 在类中 JsonReader
        返回:
        String值