Examples of writeObject()


Examples of ariba.util.io.Serializer.writeObject()

    {
        StringWriter writer = new StringWriter();
        Serializer serializer = new Serializer(writer);

        try {
            serializer.writeObject(this);
            serializer.flush();
        }
        catch (IOException e) {
            Log.util.error(2756, e);
            return null;
View Full Code Here

Examples of blackberry.common.util.json4j.internal.Serializer.writeObject()

        } else {
            serializer = new Serializer(writer);
        }

        try {
            serializer.writeObject(this);
        } catch (IOException iox) {
            JSONException jex = new JSONException("Error occurred during input read.");
            jex.setCause(iox);
            throw jex;
        }
View Full Code Here

Examples of ch.njol.yggdrasil.YggdrasilOutputStream.writeObject()

    assert s.mustSyncDeserialization() ? Bukkit.isPrimaryThread() : true;
   
    try {
      final ByteArrayOutputStream bout = new ByteArrayOutputStream();
      final YggdrasilOutputStream yout = Variables.yggdrasil.newOutputStream(bout);
      yout.writeObject(o);
      yout.flush();
      yout.close();
      final byte[] r = bout.toByteArray();
      final byte[] start = getYggdrasilStart(ci);
      for (int i = 0; i < start.length; i++)
View Full Code Here

Examples of com.alibaba.citrus.hessian.io.Hessian2Output.writeObject()

    public void serialize(Object objectToEncode, OutputStream os) throws Exception {
        Hessian2Output ho = null;

        try {
            ho = new Hessian2Output(os);
            ho.writeObject(objectToEncode);
        } finally {
            if (ho != null) {
                try {
                    ho.close();
                } catch (IOException e) {
View Full Code Here

Examples of com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject()

    oos.writeObject(data);
    System.out.println("compacted java:"+Bytes.bytes2hex(os.toByteArray())+":"+os.size());

    os = new ByteArrayOutputStream();
    Hessian2Output h2o = new Hessian2Output(os);
    h2o.writeObject(data);
    h2o.flushBuffer();
    System.out.println("hessian:"+Bytes.bytes2hex(os.toByteArray())+":"+os.size());

    os = new ByteArrayOutputStream();
    Builder<long[]> lb = Builder.register(long[].class);
View Full Code Here

Examples of com.alibaba.druid.support.json.JSONWriter.writeObject()

                    out.writeString(text.substring(0, 97) + "...");
                } else {
                    out.writeString(text);
                }
            } else if (value instanceof Number) {
                out.writeObject(value);
            } else if (value instanceof java.util.Date) {
                out.writeObject(value);
            } else if (value instanceof Boolean) {
                out.writeObject(value);
            } else if (value instanceof InputStream) {
View Full Code Here

Examples of com.alibaba.dubbo.common.serialize.ObjectOutput.writeObject()

                                throw new IllegalArgumentException("The redis set method arguments mismatch, must be two arguments. interface: " + type.getName() + ", method: " + invocation.getMethodName() + ", url: " + url);
                            }
                            byte[] key = String.valueOf(invocation.getArguments()[0]).getBytes();
                            ByteArrayOutputStream output = new ByteArrayOutputStream();
                            ObjectOutput value = getSerialization(url).serialize(url, output);
                            value.writeObject(invocation.getArguments()[1]);
                            jedisPool.getResource().set(key, output.toByteArray());
                            if (expiry > 1000) {
                                jedisPool.getResource().expire(key, expiry / 1000);
                            }
                            return new RpcResult();
View Full Code Here

Examples of com.alibaba.dubbo.common.serialize.support.java.CompactedObjectOutputStream.writeObject()

    jos.writeObject(data);
    System.out.println("java:"+Bytes.bytes2hex(os.toByteArray())+":"+os.size());

    os = new ByteArrayOutputStream();
    CompactedObjectOutputStream oos = new CompactedObjectOutputStream(os);
    oos.writeObject(data);
    System.out.println("compacted java:"+Bytes.bytes2hex(os.toByteArray())+":"+os.size());

    os = new ByteArrayOutputStream();
    Hessian2Output h2o = new Hessian2Output(os);
    h2o.writeObject(data);
View Full Code Here

Examples of com.alibaba.fastjson.JSONWriter.writeObject()

    public void test_writer() throws Exception {
        StringWriter out = new StringWriter();
        JSONWriter writer = new JSONWriter(out);
        writer.config(SerializerFeature.UseSingleQuotes, true);
        writer.startObject();
        writer.writeObject("a");
        writer.writeObject("1");
       
        writer.writeObject("b");
        writer.writeObject("2");
       
View Full Code Here

Examples of com.backtype.hadoop.pail.Pail.TypedRecordOutputStream.writeObject()

    }

    public static void emitObjectsToPail(Pail pail, Object... records) throws IOException {
        TypedRecordOutputStream os = pail.openWrite();
        for(Object r: records) {
            os.writeObject(r);
        }
        os.close();
    }

    public static void emitObjectsToPail(Pail pail, List records) throws IOException {
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.