Package org.jboss.serial.io

Examples of org.jboss.serial.io.JBossObjectInputStream


      {
         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

      {
         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

        try {
            fis = new FileInputStream(file);
            bufStream = new BufferedInputStream(fis, 2000000);
            if (useJBS)
            {
                oos = new JBossObjectInputStream(bufStream);
            } else
            {
                oos = new ObjectInputStream(bufStream);
            }
View Full Code Here

      
       objOut.writeObject(largeString);
       objOut.close();
      
       ByteArrayInputStream byteInput = new ByteArrayInputStream(byteArray.toByteArray());
       JBossObjectInputStream objInp = new JBossObjectInputStream(byteInput);
      
       String newString = (String)objInp.readObject();
      
       assertEquals(largeString.length(), newString.length());
       assertEquals(largeString,newString);

    }
View Full Code Here

            byte[] byteArray = byteOut.toByteArray();
            saveFile("/tmp/jboss-test-" + myTest.getClass().getName() + ".bin",byteArray);
            System.out.println(myTest.getClass().getName() +" produced " + byteArray.length + " on JBossSerialization");
            ByteArrayInputStream byteInput = new ByteArrayInputStream(byteArray);

            JBossObjectInputStream input = new JBossObjectInputStream(byteInput,buffer);

            Object value = input.readObject();

            assertNotSame(myTest,value);
            if (!(myTest instanceof String) && !(myTest instanceof String[]))
            {
              assertSame(myTest.getClass(),value.getClass());
View Full Code Here

            byte[] byteArray = byteOut.toByteArray();
            saveFile("/tmp/jboss-direct-test-" + myTest.getClass().getName() + ".bin",byteArray);
            System.out.println(myTest.getClass().getName() +" produced " + byteArray.length + " on doTestJBossSerializationInDirect");
            ByteArrayInputStream byteInput = new ByteArrayInputStream(byteArray);

            JBossObjectInputStream input = new JBossObjectInputStream(byteInput,buffer);

            Object value = input.readObjectUsingDataContainer();

            assertNotSame(myTest,value);
            assertSame(myTest.getClass(),value.getClass());
            if (!(myTest instanceof String[]))assertEquals(myTest,value);
        }
View Full Code Here

        objout.writeObject(proxy);
        objout.flush();

        SizeBenchmarkTestCase.saveFileNoCheck("/tmp/check.bin",byteout.toByteArray());
       
        JBossObjectInputStream objectInput = new JBossObjectInputStream(new ByteArrayInputStream(byteout.toByteArray()));
        BaseClass baseNew = (BaseClass)objectInput.readObject();
        assertEquals(4,baseNew.doSomething(5));
  }
View Full Code Here

        objout.writeObject(proxy.getClass());
        objout.flush();

        SizeBenchmarkTestCase.saveFileNoCheck("/tmp/check.bin",byteout.toByteArray());
       
        JBossObjectInputStream objectInput = new JBossObjectInputStream(new ByteArrayInputStream(byteout.toByteArray()));
        Class baseNew = (Class)objectInput.readObject();
        assertEquals(proxy.getClass(),baseNew);
        //assertEquals(4,baseNew.doSomething(5));
  }
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.