Package org.jboss.serial.io

Examples of org.jboss.serial.io.JBossObjectInputStream


     
      byte[] bytes = os.toByteArray();
     
      ByteArrayInputStream is = new ByteArrayInputStream(bytes);
     
      JBossObjectInputStream ois = new JBossObjectInputStream(is);
     
      TestMessage tm2 = (TestMessage)ois.readObject();
     
      assertEquals(tm.id, tm2.id);
     
      ois.close();
           
   }
View Full Code Here


         case SERIALIZABLE:
         {
            ObjectInputStream ois;
            if (useJBossSerialization)
            {
               ois = new JBossObjectInputStream(in);
            }
            else
            {
               ois = new ObjectInputStream(in);
            }
View Full Code Here

  public BaseAuthorization[] getAuthorizations() {
    BaseAuthorization[] res = new BaseAuthorization[authorizations.length];
    try {
      for (int i = 0; i < authorizations.length; i++) {
        ByteArrayInputStream bais = new ByteArrayInputStream(authorizations[i]);
        JBossObjectInputStream deserialize = new JBossObjectInputStream(bais);
        Object obj = deserialize.readObject();
        res[i] = (BaseAuthorization) obj;
      }
    } catch (ClassNotFoundException cnfe) {
      Logger log = LoggerFactory.getLogger(SavedAuthenticationImpl.class);
      log.error("Can not deserialize object, may cause rights to be lost.", cnfe);
View Full Code Here

         out.writeObject(this);
         out.flush();

         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());

         JBossObjectInputStream is = new JBossObjectInputStream(bais);
         bean = (ClusteredStatefulBean)is.readObject();
      }
      catch (IOException e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

         out.writeObject(this);
         out.flush();

         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());

         JBossObjectInputStream is = new JBossObjectInputStream(bais);
         bean = (StatefulBean)is.readObject();
      }
      catch (IOException e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

         out.writeObject(this);
         out.flush();

         ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());

         JBossObjectInputStream is = new JBossObjectInputStream(bais);
         bean = (TreeCacheStatefulBase) is.readObject();
      }
      catch (IOException e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

      {
         FileInputStream fis = FISAction.open(file);
         // todo need to rewrite SessionObjectInputStream to support EJB3 classes
         ObjectInputStream in;

         in = new JBossObjectInputStream(new BufferedInputStream(fis));
         try
         {
            bean = (StatefulBeanContext) in.readObject();
         }
         finally
View Full Code Here

         {
            ObjectInputStream in;
           
            FileInputStream fis = FISAction.open(file);
  
            in = new JBossObjectInputStream(new BufferedInputStream(fis));
            try
            {
               StatefulBeanContext bean = (StatefulBeanContext) in.readObject();
               beans.add(bean);
            }
View Full Code Here

                    //ObjectInputStream objStream = new ObjectInputStream(bufStream);
                    //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

        Object obj = NonSerializableTestData.createObj();
        out.writeObject(obj);
        out.flush();

        ByteArrayInputStream byteInput = new ByteArrayInputStream(byteOut.toByteArray());
        JBossObjectInputStream inp = new JBossObjectInputStream(byteInput);

        Object obj2 = inp.readObject();

        assertEquals(obj,obj2);
    }
View Full Code Here

TOP

Related Classes of org.jboss.serial.io.JBossObjectInputStream

Copyright © 2018 www.massapicom. 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.