模块 org.redkale

类 JsonCharsWriter


  • public class JsonCharsWriter
    extends JsonWriter
    writeTo系列的方法输出的字符不能含特殊字符

    详情见: https://redkale.org

    从以下版本开始:
    2.3.0
    作者:
    zhangjx
    • 构造器详细资料

      • JsonCharsWriter

        public JsonCharsWriter()
      • JsonCharsWriter

        public JsonCharsWriter​(int size)
    • 方法详细资料

      • recycle

        protected boolean recycle()
        覆盖:
        recycle 在类中 Writer
      • 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 b)
        指定者:
        writeTo 在类中 JsonWriter
      • writeTo

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

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

        public byte[] toBytes()
      • count

        public int count()
      • writeString

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

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