Examples of JBossObjectInputStream


Examples of org.jboss.serial.io.JBossObjectInputStream

   {
      if (trace) { log.trace(this + " creating JBossObjectInputStream"); }
     
      if (SecurityUtility.skipAccessControl())
      {
         return new JBossObjectInputStream(input, loader, new StringUtilBuffer(10024, 10024));
      }
     
      try
      {
         return (ObjectInputStream)AccessController.doPrivileged( new PrivilegedExceptionAction()
         {
            public Object run() throws Exception
            {
               return new JBossObjectInputStream(input, loader, new StringUtilBuffer(10024, 10024));
            }
         });
      }
      catch (PrivilegedActionException e)
      {
View Full Code Here

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

Examples of org.jboss.serial.io.JBossObjectInputStream

         {
            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

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

Examples of org.jboss.serial.io.JBossObjectInputStream

         {
            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

Examples of org.jboss.serial.io.JBossObjectInputStream

        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

Examples of org.jboss.serial.io.JBossObjectInputStream

      
       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

Examples of org.jboss.serial.io.JBossObjectInputStream

            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

Examples of org.jboss.serial.io.JBossObjectInputStream

            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

Examples of org.jboss.serial.io.JBossObjectInputStream

        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
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.