模块 org.redkale

类 JsonByteBufferWriter


  • public class JsonByteBufferWriter
    extends JsonWriter
    以ByteBuffer为数据载体的JsonWriter

    详情见: https://redkale.org

    作者:
    zhangjx
    • 字段详细资料

      • charset

        protected Charset charset
    • 构造器详细资料

      • JsonByteBufferWriter

        public JsonByteBufferWriter​(int features,
                                    Supplier<ByteBuffer> supplier)
    • 方法详细资料

      • recycle

        protected boolean recycle()
        覆盖:
        recycle 在类中 Writer
      • toByteArray

        public ByteArray toByteArray()
      • count

        public int count()
      • writeTo

        public void writeTo​(char ch)
        指定者:
        writeTo 在类中 JsonWriter
      • writeTo

        public void writeTo​(char[] chs,
                            int start,
                            int len)
        指定者:
        writeTo 在类中 JsonWriter
      • writeTo

        public void writeTo​(byte ch)
        指定者:
        writeTo 在类中 JsonWriter
      • writeTo

        public void writeTo​(byte[] chs,
                            int start,
                            int len)
        指定者:
        writeTo 在类中 JsonWriter
      • encodeEscapeUTF8Length

        protected static int encodeEscapeUTF8Length​(char[] text,
                                                    int start,
                                                    int len)
      • writeLatin1To

        public void writeLatin1To​(boolean quote,
                                  String value)
        注意: 该String值不能为null且不会进行转义, 只用于不含需要转义字符的字符串,例如enum、double、BigInteger、BigDecimal转换的String
        指定者:
        writeLatin1To 在类中 JsonWriter
        参数:
        quote - 是否写入双引号
        value - String值
      • writeFieldShortValue

        public void writeFieldShortValue​(byte[] fieldBytes,
                                         char[] fieldChars,
                                         short value)
        指定者:
        writeFieldShortValue 在类中 JsonWriter
      • writeFieldIntValue

        public void writeFieldIntValue​(byte[] fieldBytes,
                                       char[] fieldChars,
                                       int value)
        指定者:
        writeFieldIntValue 在类中 JsonWriter
      • writeFieldLongValue

        public void writeFieldLongValue​(byte[] fieldBytes,
                                        char[] fieldChars,
                                        long value)
        指定者:
        writeFieldLongValue 在类中 JsonWriter
      • writeLastFieldShortValue

        public void writeLastFieldShortValue​(byte[] fieldBytes,
                                             char[] fieldChars,
                                             short value)
        指定者:
        writeLastFieldShortValue 在类中 JsonWriter
      • writeLastFieldIntValue

        public void writeLastFieldIntValue​(byte[] fieldBytes,
                                           char[] fieldChars,
                                           int value)
        指定者:
        writeLastFieldIntValue 在类中 JsonWriter
      • writeLastFieldLongValue

        public void writeLastFieldLongValue​(byte[] fieldBytes,
                                            char[] fieldChars,
                                            long value)
        指定者:
        writeLastFieldLongValue 在类中 JsonWriter
      • writeObjectByOnlyTwoIntFieldValue

        public void writeObjectByOnlyTwoIntFieldValue​(byte[] firstFieldBytes,
                                                      char[] firstFieldChars,
                                                      int value1,
                                                      byte[] lastFieldBytes,
                                                      char[] lastFieldChars,
                                                      int value2)
        指定者:
        writeObjectByOnlyTwoIntFieldValue 在类中 JsonWriter
      • writeBoolean

        public void writeBoolean​(boolean value)
        从类复制的说明: Writer
        写入一个boolean值
        指定者:
        writeBoolean 在类中 JsonWriter
        参数:
        value - boolean值
      • writeInt

        public void writeInt​(int value)
        从类复制的说明: Writer
        写入一个int值
        指定者:
        writeInt 在类中 JsonWriter
        参数:
        value - int值
      • writeLong

        public void writeLong​(long value)
        从类复制的说明: Writer
        写入一个long值
        指定者:
        writeLong 在类中 JsonWriter
        参数:
        value - long值
      • writeString

        public void writeString​(String value)
        从类复制的说明: Writer
        写入一个String值
        指定者:
        writeString 在类中 JsonWriter
        参数:
        value - String值
      • writeWrapper

        public void writeWrapper​(StringWrapper wrapper)
        从类复制的说明: Writer
        写入一个StringConvertWrapper值
        指定者:
        writeWrapper 在类中 Writer
        参数:
        wrapper - StringConvertWrapper值