Package org.jboss.util.stream

Examples of org.jboss.util.stream.MarshalledValueOutputStream.writeObject()


    */
   byte[] objectToByteBufferInternal (Object obj) throws Exception
   {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(baos);
      mvos.writeObject(obj);
      mvos.flush();
      return baos.toByteArray();
   }
  
   /**
 
View Full Code Here


      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      // write a marker to stream to distinguish from null value stream
      baos.write(SERIALIZABLE_VALUE);
      MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(baos);
      mvos.writeObject(obj);
      mvos.flush();
      return baos.toByteArray();
   }
  
   private void notifyChannelLock()
View Full Code Here

               }
               else
               {
                  MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(ostream);
                  toClose = mvos;
                  mvos.writeObject(state);
               }
            }
            catch (Exception ex)
            {
               CoreGroupCommunicationService.this.log.error("getState failed for service " + serviceName, ex);
View Full Code Here

            Object state = provider.getCurrentState();
            try
            {
               ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
               mvos = new MarshalledValueOutputStream(baos);
               mvos.writeObject(state);
               mvos.flush();
               mvos.close();
               return baos.toByteArray();
            }
            catch (Exception ex)
View Full Code Here

    }

    public MarshalledValue(Object obj) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(baos);
        mvos.writeObject(obj);
        mvos.flush();
        serializedForm = baos.toByteArray();
        mvos.close();
        // Use the java.rmi.MarshalledObject hash code calculation
        int hash = 0;
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.