Examples of writeObject()


Examples of net.jini.io.MarshalOutputStream.writeObject()

                 child.getInputStream(),
                 child.getErrorStream());
        MarshalOutputStream out =
      new MarshalOutputStream(child.getOutputStream(),
            Collections.EMPTY_LIST);
        out.writeObject(id);
        ActivationGroupDesc gd = desc;
        if (gd.getClassName() == null) {
      MarshalledObject data = gd.getData();
      if (data == null) {
          data = groupData;
View Full Code Here

Examples of net.sourceforge.htmlunit.corejs.javascript.serialize.ScriptableOutputStream.writeObject()

    Object obj = args[ 0 ];
    String filename = Context.toString( args[ 1 ] );
    FileOutputStream fos = new FileOutputStream( filename );
    Scriptable scope = ScriptableObject.getTopLevelScope( thisObj );
    ScriptableOutputStream out = new ScriptableOutputStream( fos, scope );
    out.writeObject( obj );
    out.close();
  }

  @GlobalFunction
  public static Object deserialize( Context cx, Scriptable thisObj, Object[] args, Function funObj ) throws IOException, ClassNotFoundException {
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.BytesMessageImpl.writeObject()

   
    msg = new BytesMessageImpl();
   
    try { msg.writeBytes(null); } catch (NullPointerException e) { /* OK */ }
    try { msg.writeBytes(null, 0, 0); } catch (NullPointerException e) { /* OK */ }
    try { msg.writeObject(null); } catch (NullPointerException e) { /* OK */ }
    try { msg.writeUTF(null); } catch (NullPointerException e) { /* OK */ }
  }
 
  public void testRollback() throws Exception
  {
View Full Code Here

Examples of one.nio.serial.CalcSizeStream.writeObject()

        }
    }

    private byte[] serialize(Object request) throws IOException {
        CalcSizeStream css = new CalcSizeStream();
        css.writeObject(request);
        int requestSize = css.count();

        byte[] buffer = new byte[requestSize + 4];
        DataStream ds = css.hasCycles() ? new SerializeStream(buffer) : new DataStream(buffer);
        ds.writeInt(requestSize);
View Full Code Here

Examples of one.nio.serial.DataStream.writeObject()

        int requestSize = css.count();

        byte[] buffer = new byte[requestSize + 4];
        DataStream ds = css.hasCycles() ? new SerializeStream(buffer) : new DataStream(buffer);
        ds.writeInt(requestSize);
        ds.writeObject(request);
        return buffer;
    }

    private void sendRequest(Socket socket, byte[] buffer) throws IOException {
        socket.writeFully(buffer, 0, buffer.length);
View Full Code Here

Examples of one.nio.serial.SerializeStream.writeObject()

        });

        SerializeStream ss = new SerializeStream(mmap.getAddr() + CUSTOM_DATA_OFFSET, MAX_CUSTOM_DATA_SIZE);
        try {
            for (Serializer serializer : serializers) {
                ss.writeObject(serializer);
            }
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
View Full Code Here

Examples of org.activemq.message.ActiveMQBytesMessage.writeObject()

    }
  }
  public void testWriteObject() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeObject(new Boolean(true));
      msg.writeObject(new Long(300l));
      msg.writeObject(new Float(3.3f));
      msg.writeObject(new Character('q'));
      msg.writeObject(new Byte((byte) 1));
      msg.writeObject(new Short((short) 3));
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQBytesMessage.writeObject()

                msg.setConnection(connection);
                Object obj = null;

                try {
                    while ((obj = streamMessage.readObject()) != null) {
                        msg.writeObject(obj);
                    }
                } catch (MessageEOFException e) {
                    // if an end of message stream as expected
                } catch (JMSException e) {
                }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQMapMessage.writeObject()

                msg.setConnection(connection);
                Object obj = null;

                try {
                    while ((obj = streamMessage.readObject()) != null) {
                        msg.writeObject(obj);
                    }
                } catch (MessageEOFException e) {
                    // if an end of message stream as expected
                } catch (JMSException e) {
                }
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQObjectMessage.writeObject()

                msg.setConnection(connection);
                Object obj = null;

                try {
                    while ((obj = streamMessage.readObject()) != null) {
                        msg.writeObject(obj);
                    }
                } catch (MessageEOFException e) {
                    // if an end of message stream as expected
                } catch (JMSException e) {
                }
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.