Package org.jboss.invocation

Examples of org.jboss.invocation.MarshalledValueOutputStream.writeObject()


            {
               try
               {
                  ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
                  MarshalledValueOutputStream maos = new MarshalledValueOutputStream(baos);
                  maos.writeObject(list);
                  maos.close();
                  retval.add(baos.toByteArray());
               }
               catch (IOException e)
               {
View Full Code Here


      try {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
         MarshalledValueOutputStream out = new MarshalledValueOutputStream(baos);
         // Write out the version for reader can know how to integrate
         out.writeShort(STATE_TRANSFER_VERSION);
         out.writeObject(states);           
         out.close();
         retval = baos.toByteArray();
        
         log.info("returning the state for tree rooted in " + fqn.toString() +
                  "(" + retval.length + " bytes)");
View Full Code Here

     */
    public static byte[] objectToByteBuffer(Object obj) throws Exception
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        MarshalledValueOutputStream out = new MarshalledValueOutputStream(baos);
        out.writeObject(obj);
        out.close();
        return baos.toByteArray();
    }

}
View Full Code Here

      // Extract fqn and write it out in fixed format
      if(fqn == null) fqn = "NULL"; // can't write null. tis can be commit.
      oos.writeUTF(fqn);
      // Serialize the rest of MethodCall object
      oos.writeObject(o);
      if (log_.isTraceEnabled()) {
         log_.trace("send");
         log_.trace(getColumnDump(bos.toByteArray()));
      }
      return bos.toByteArray();
View Full Code Here

            {
               try
               {
                  ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
                  MarshalledValueOutputStream maos = new MarshalledValueOutputStream(baos);
                  maos.writeObject(list);
                  maos.close();
                  retval.add(baos.toByteArray());
               }
               catch (IOException e)
               {
View Full Code Here

            {
               try
               {
                  ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
                  MarshalledValueOutputStream maos = new MarshalledValueOutputStream(baos);
                  maos.writeObject(list);
                  maos.close();
                  retval.add(baos.toByteArray());
               }
               catch (IOException e)
               {
View Full Code Here

            {
               try
               {
                  ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
                  MarshalledValueOutputStream maos = new MarshalledValueOutputStream(baos);
                  maos.writeObject(list);
                  maos.close();
                  retval.add(baos.toByteArray());
               }
               catch (IOException e)
               {
View Full Code Here

               stream.write(SERIALIZABLE_VALUE);
              
               mvos = new MarshalledValueOutputStream(stream);
            }
           
            mvos.writeObject(entry.getKey());
            mvos.writeObject(state);
         }
      }
     
      if (mvos == null)
View Full Code Here

              
               mvos = new MarshalledValueOutputStream(stream);
            }
           
            mvos.writeObject(entry.getKey());
            mvos.writeObject(state);
         }
      }
     
      if (mvos == null)
      {
View Full Code Here

         // We never wrote any serviceState, so write the NULL header
         stream.write(NULL_VALUE);
      }
      else
      {
         mvos.writeObject(new StateStreamEnd());
         mvos.flush();
         mvos.close();
      }
     
   }
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.