Package org.jboss.serial.io

Examples of org.jboss.serial.io.JBossObjectInputStream.readObject()


    ObjectOutputStream objOut = new JBossObjectOutputStream(byteOut);
    TestReferences obj1 = new TestReferences();
    objOut.writeObject(obj1);
    objOut.close();
    ObjectInputStream input = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()));
    Object obj2 = input.readObject();
   
    System.out.println("obj2=" + obj2);
   
  }
 
View Full Code Here


                    //Object obj = objStream.readObject();



                    ObjectInput containerInput = new JBossObjectInputStream(bufStream);
                    TestProxy objRead = (TestProxy)containerInput.readObject();
                    int result = objRead.getProxy().doSomething();

                    BufferedOutputStream bufOut = new BufferedOutputStream(socket.getOutputStream());
                    JBossObjectOutputStream objOut = new JBossObjectOutputStream(bufOut);
View Full Code Here

  {
       System.out.println("De-serializing...");      
       FileInputStream fis = new FileInputStream(fileName);
       JBossObjectInputStream ois = new JBossObjectInputStream(fis);
      
       Object data = ois.readObject();   
      
       ois.close();
       fis.close();
      
       return data;
View Full Code Here

    public static Object readObjectIntoJBoss(byte[] byteArray) throws Exception
    {
        ByteArrayInputStream byteInp = new ByteArrayInputStream(byteArray);
        JBossObjectInputStream objInp = new JBossObjectInputStream(byteInp);
        return objInp.readObject();
    }
}
View Full Code Here

/* 68 */     SerializableWrapper wrapper = (SerializableWrapper)target;
/* 69 */     byte[] payload = wrapper.getPayload();
/* 70 */     ByteArrayInputStream bais = new ByteArrayInputStream(payload);
/* 71 */     ObjectInputStream ois = new ObjectInputStream(bais);
/* 72 */     JBossObjectInputStream jbis = new JBossObjectInputStream(ois);
/* 73 */     Object result = jbis.readObject();
/* 74 */     return result;
/*    */   }
/*    */
/*    */   public void serialize(Object[] targets)
/*    */     throws Exception
View Full Code Here

/*     */     {
/* 173 */       FileInputStream fis = FISAction.open(file);
/* 174 */       ObjectInputStream in = new JBossObjectInputStream(fis);
/*     */       try
/*     */       {
/* 177 */         Identifiable localIdentifiable = (Identifiable)in.readObject();
/*     */         return localIdentifiable;
/*     */       }
/*     */       finally
/*     */       {
/* 181 */         in.close();
View Full Code Here

/* 290 */       FileInputStream fis = FISAction.open(file);
/*     */
/* 294 */       ObjectInputStream in = new JBossObjectInputStream(new BufferedInputStream(fis));
/*     */       try
/*     */       {
/* 297 */         bean = (StatefulBeanContext)in.readObject();
/*     */       }
/*     */       finally
/*     */       {
/* 301 */         fis.close();
/* 302 */         in.close();
View Full Code Here

/* 332 */         FileInputStream fis = FISAction.open(file);
/*     */
/* 334 */         ObjectInputStream in = new JBossObjectInputStream(new BufferedInputStream(fis));
/*     */         try
/*     */         {
/* 337 */           StatefulBeanContext bean = (StatefulBeanContext)in.readObject();
/* 338 */           beans.add(bean);
/*     */         }
/*     */         finally
/*     */         {
/* 342 */           fis.close();
View Full Code Here

      {
         FileInputStream fis = FISAction.open(file);
         ObjectInputStream in = new JBossObjectInputStream(fis);
         try
         {
            return (T) in.readObject();
         }
         finally
         {
            in.close();
            DeleteFileAction.delete(file);
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.