Examples of writeObject()


Examples of com.betfair.cougar.transport.api.protocol.CougarObjectOutput.writeObject()

    }

    public static void writeEventMessageToSession(IoSession session, Object obj, CougarObjectIOFactory objectIOFactory) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        CougarObjectOutput out = objectIOFactory.newCougarObjectOutput(baos, CougarProtocol.getProtocolVersion(session));
        out.writeObject(obj);
        out.flush();

        session.write(new EventMessage(baos.toByteArray()));
    }
View Full Code Here

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

    }

    out.writeInt(HmtpPacketType.MESSAGE.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeObject(payload);

    out.flushBuffer();
  }

  /**
 
View Full Code Here

Examples of com.caucho.hessian.io.HessianOutput.writeObject()

     * @see de.netseeker.ejoe.adapter.SerializeAdapter#write(java.lang.Object, java.io.OutputStream)
     */
    public void write( Object obj, OutputStream out ) throws Exception
    {
        HessianOutput hOut = new HessianOutput( out );
        hOut.writeObject( obj );
    }
}
View Full Code Here

Examples of com.caucho.hessian.io.Serializer.writeObject()

    Serializer serializer;

    serializer = _serializerFactory.getSerializer(object.getClass());

    serializer.writeObject(object, this);
  }

  /**
   * Writes the list header to the stream.  List writers will call
   * <code>writeListBegin</code> followed by the list contents and then
View Full Code Here

Examples of com.caucho.hessian4.io.HessianOutput.writeObject()

     * @see org.jboss.netty.channel.SimpleChannelDownstreamHandler#writeRequested(org.jboss.netty.channel.ChannelHandlerContext, org.jboss.netty.channel.MessageEvent)
     */
    public void writeRequested(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
    OutputStream out = OutputStreamEncoder.getOutputStream(ctx);
    HessianOutput hout = new HessianOutput(out);
    hout.writeObject(e.getMessage());
    hout.flush();
    }


}
View Full Code Here

Examples of com.caucho.jms.message.StreamMessageImpl.writeObject()

    try {
      while (true) {
        Object obj = in.readObject();

        stream.writeObject(obj);
      }
    } catch (EOFException e) {
    } catch (Exception e) {
      throw new JmsExceptionWrapper(e);
    }
View Full Code Here

Examples of com.caucho.json.JsonOutput.writeObject()

      os.print(",\"");
      writeType(os, value);
      os.print("\"");

      os.print(",");
      out.writeObject(value);
      out.flushBuffer();
      os.write("]");
    } catch (IOException e) {
      throw new ProtocolException(e);
    }
View Full Code Here

Examples of com.esotericsoftware.kryo.Kryo.writeObject()

        skv.incrementIteration();
        // Serialize to a byte array in ram.
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        Output ko = new Output(bos);
        Kryo kry = new Kryo();
        kry.writeObject(ko, skv);
        ko.flush();
        // Deserialize.
        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
        Input ki = new Input(bis);
        LazyVector des = (LazyVector)kry.readObject(ki, LazyVector.class);
View Full Code Here

Examples of com.esotericsoftware.kryo.ObjectBuffer.writeObject()

    Kryo kryo = new Kryo();
    ObjectBuffer buffer = new ObjectBuffer(kryo, 100000);
    List<DataProvider> providers = registerClasses(kryo);
    try {
      FileOutputStream fileOutputStream = new FileOutputStream(path);
      buffer.writeObject(fileOutputStream, providers);
      fileOutputStream.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of com.esotericsoftware.kryo.Serializer.writeObject()

      }

      for (int i = 0, n = cachedMethod.serializers.length; i < n; i++) {
        Serializer serializer = cachedMethod.serializers[i];
        if (serializer != null)
          serializer.writeObject(buffer, args[i]);
        else
          kryo.writeClassAndObject(buffer, args[i]);
      }

      if (method.getReturnType() != void.class) buffer.put(responseID);
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.