Examples of writeIntAndChar()


Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

    Assert.assertEquals("[-1]", writer.toString());
  }

  public void test_4() throws Exception {
    SerializeWriter writer = new SerializeWriter();
    writer.writeIntAndChar(-1, ',');
    Assert.assertEquals("-1,", writer.toString());
  }

  public void test_5() throws Exception {
    SerializeWriter writer = new SerializeWriter();
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

        Assert.assertEquals(Long.toString(Long.MAX_VALUE), out.toString());
    }

    public void test_15() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.writeIntAndChar(Integer.MAX_VALUE, ',');
        Assert.assertEquals(Integer.toString(Integer.MAX_VALUE) + ",", out.toString());
    }

    public void test_15_long() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

        Assert.assertEquals(Long.toString(Long.MAX_VALUE) + ",", out.toString());
    }

    public void test_16() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.writeIntAndChar(Integer.MIN_VALUE, ',');
        Assert.assertEquals(Integer.toString(Integer.MIN_VALUE) + ",", out.toString());
    }

    public void test_16_long() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

       
        SerializeWriter writer = new SerializeWriter(out, 10);
        Assert.assertEquals(10, writer.getBufferLength());
       
        writer.write("abcde");
        writer.writeIntAndChar(12345678, ',');
        writer.close();
       
        String text = out.toString();
        Assert.assertEquals("abcde12345678,", text);
    }
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

        Assert.assertEquals(Long.toString(Long.MAX_VALUE), out.toString());
    }

    public void test_15() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.writeIntAndChar(Integer.MAX_VALUE, ',');
        Assert.assertEquals(Integer.toString(Integer.MAX_VALUE) + ",", out.toString());
    }

    public void test_15_long() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

        Assert.assertEquals(Long.toString(Long.MAX_VALUE) + ",", out.toString());
    }

    public void test_16() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.writeIntAndChar(Integer.MIN_VALUE, ',');
        Assert.assertEquals(Integer.toString(Integer.MIN_VALUE) + ",", out.toString());
    }

    public void test_16_long() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

        Media media = (Media) object;

        SerializeWriter out = serializer.getWriter();
        out.write('[');
       
        out.writeIntAndChar(media.getBitrate(), ',');
        out.writeIntAndChar(media.getHeight(), ',');
        out.writeIntAndChar(media.getWidth(), ',');
        out.writeString(media.getCopyright(), ',');
        out.writeLongAndChar(media.getDuration(), ',');
        out.writeString(media.getFormat(), ',');
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

        SerializeWriter out = serializer.getWriter();
        out.write('[');
       
        out.writeIntAndChar(media.getBitrate(), ',');
        out.writeIntAndChar(media.getHeight(), ',');
        out.writeIntAndChar(media.getWidth(), ',');
        out.writeString(media.getCopyright(), ',');
        out.writeLongAndChar(media.getDuration(), ',');
        out.writeString(media.getFormat(), ',');
        out.write('[');
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

        SerializeWriter out = serializer.getWriter();
        out.write('[');
       
        out.writeIntAndChar(media.getBitrate(), ',');
        out.writeIntAndChar(media.getHeight(), ',');
        out.writeIntAndChar(media.getWidth(), ',');
        out.writeString(media.getCopyright(), ',');
        out.writeLongAndChar(media.getDuration(), ',');
        out.writeString(media.getFormat(), ',');
        out.write('[');
        for (int i = 0; i < media.getPersons().size(); ++i) {
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeIntAndChar()

        Image image = (Image) object;

        SerializeWriter out = serializer.getWriter();
        out.write('[');
       
        out.writeIntAndChar(image.getHeight(), ',');
        out.writeIntAndChar(image.getWidth(), ',');
        out.writeString(image.getSize().name(), ',');
        out.writeString(image.getTitle(), ',');
        out.writeString(image.getUri());
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.