Examples of writeObject()


Examples of org.drools.common.DroolsObjectOutputStream.writeObject()

            droolsStream = (DroolsObjectOutputStream) out;
        } else {
            bytes = new ByteArrayOutputStream();
            droolsStream = new DroolsObjectOutputStream( bytes );
        }
        droolsStream.writeObject( rules );
        droolsStream.writeObject( namedWindows );
        droolsStream.writeObject( idGenerator );
        droolsStream.writeBoolean( ordered );
        if ( !isDrools ) {
            droolsStream.flush();
View Full Code Here

Examples of org.drools.core.common.DroolsObjectOutputStream.writeObject()

            return null;
        }
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new DroolsObjectOutputStream(baos);
            oos.writeObject(origin);
            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
            ObjectInputStream ois = new DroolsObjectInputStream(bais, classLoader);
            Object deepCopy = ois.readObject();
            return (T)deepCopy;
        } catch(IOException ioe) {
View Full Code Here

Examples of org.elasticsearch.common.io.ThrowableObjectOutputStream.writeObject()

            try {
                stream = cachedEntry.cachedBytes();
                writeResponseExceptionHeader(stream);
                RemoteTransportException tx = new RemoteTransportException(targetTransport.nodeName(), targetTransport.boundAddress().boundAddress(), action, error);
                ThrowableObjectOutputStream too = new ThrowableObjectOutputStream(stream);
                too.writeObject(tx);
                too.close();
            } catch (NotSerializableException e) {
                stream = cachedEntry.cachedBytes();
                writeResponseExceptionHeader(stream);
                RemoteTransportException tx = new RemoteTransportException(targetTransport.nodeName(), targetTransport.boundAddress().boundAddress(), action, new NotSerializableTransportException(error));
View Full Code Here

Examples of org.elasticsearch.common.jackson.core.JsonGenerator.writeObject()

      generator.writeStartObject();
      for (SearchHitField value : values) {
        if (value.getValues().size() > 1) {
          generator.writeArrayFieldStart(value.getName());
          for (Object val : value.getValues()) {
            generator.writeObject(val);
          }
          generator.writeEndArray();
        } else {
          generator.writeObjectField(value.getName(), value.getValue());
        }
View Full Code Here

Examples of org.exoplatform.commons.serialization.serial.ObjectWriter.writeObject()

   public <O> O clone(O o) throws IOException, ClassNotFoundException
   {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectWriter writer = new ObjectWriter(this, baos);
      writer.writeObject(o);
      writer.close();
      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      ObjectReader in = new ObjectReader(this, bais);
      return (O)in.readObject();
   }
View Full Code Here

Examples of org.exoplatform.webui.application.replication.serial.ObjectWriter.writeObject()

   public <O> O clone(O o) throws IOException, ClassNotFoundException
   {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectWriter writer = new ObjectWriter(this, baos);
      writer.writeObject(o);
      writer.close();
      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      ObjectReader in = new ObjectReader(this, bais);
      return (O)in.readObject();
   }
View Full Code Here

Examples of org.fressian.FressianWriter.writeObject()

     * @throws IOException if connection breaks or server error occurs when processing submitted data;
     */
    public void submit(Object data) throws IOException {
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        FressianWriter writer = new FressianWriter(os, FressianTraceFormat.WRITE_LOOKUP);
        writer.writeObject(data);
        writer.close();
        send(ZICO_DATA, ZicoCommonUtil.pack(data));
        ZicoPacket pkt = recv();
        if (pkt.getStatus() != ZICO_OK) {
            throw new ZicoException(pkt.getStatus(), "ZICO submission error: status=" + pkt.getStatus());
View Full Code Here

Examples of org.hornetq.jms.client.HornetQStreamMessage.writeObject()

   public void testWriteObjectWithNull() throws Exception
   {
      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeObject(null);
   }

   public void testWriteObjectWithInvalidType() throws Exception
   {
      HornetQStreamMessage message = new HornetQStreamMessage();
View Full Code Here

Examples of org.hornetq.jms.tests.message.SimpleJMSStreamMessage.writeObject()

      m.writeChar('c');
      m.writeDouble(1.0D);
      m.writeFloat(2.0F);
      m.writeInt(3);
      m.writeLong(4L);
      m.writeObject("object");
      m.writeShort((short)5);
      m.writeString("stringvalue");

      return m;
   }
View Full Code Here

Examples of org.infinispan.commons.marshall.AdvancedExternalizer.writeObject()

         } else {
            throw new CacheException(String.format(
                  "Object of type %s is not supported by externalizer %s",
                  object.getClass().getName(), this.getClass().getName()));
         }
         ext.writeObject(output, object);
      }

      @Override
      public Object readObject(ObjectInput input) throws IOException, ClassNotFoundException {
         int index = input.read();
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.