Package org.jboss.serial.io

Examples of org.jboss.serial.io.JBossObjectOutputStream


      buffOut = new BufferedOutputStream(socketOut,100*1024);

      if (USE_JBSER)
      {
        output = new JBossObjectOutputStream(buffOut);
      }
      else
      {
        output = new ObjectOutputStream(buffOut);
      }
View Full Code Here


            {
              if (i==START_MEASURE)
                    ThreadLocalBenchmark.openBench(dataObject.getClass().getName(),metaData);
                ByteArrayOutputStream outByte = new ByteArrayOutputStream();
                BufferedOutputStream buffOut  = new BufferedOutputStream(outByte);
                ObjectOutputStream output = new JBossObjectOutputStream(buffOut);
                output.writeObject(dataObject);
                output.flush();
                buffOut.flush();

                ByteArrayInputStream inptByte = new ByteArrayInputStream(outByte.toByteArray());
                ObjectInputStream input = new JBossObjectInputStream(inptByte);
View Full Code Here

      }
        try
        {
                ByteArrayOutputStream outByte = new ByteArrayOutputStream();
                BufferedOutputStream buffOut  = new BufferedOutputStream(outByte);
                ObjectOutputStream output = new JBossObjectOutputStream(buffOut);
                output.writeObject(dataObject);
                output.flush();
                buffOut.flush();

                ByteArrayInputStream inptByte = new ByteArrayInputStream(outByte.toByteArray());
                ObjectInputStream input = new JBossObjectInputStream(inptByte);
                Object obj=null;
View Full Code Here

    Class testClass = loader.loadClass(CLASS_NAME);
    Object someInstance = testClass.newInstance();
   
   
    ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
    JBossObjectOutputStream objOut = new JBossObjectOutputStream(byteOut);
   
    objOut.writeObject(someInstance);
    objOut.flush();
   
    JBossObjectInputStream objInput = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()),loader);
    Object newObject = objInput.readObject();

    forceGC();
View Full Code Here

 
      Method method = testClass2.getMethod("setOtherPojo",new Class[]{Object.class});
      method.invoke(rootObject,new Object[]{childObject});
     
      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      JBossObjectOutputStream objOut = new JBossObjectOutputStream(byteOut);
     
      objOut.writeObject(rootObject);
      objOut.flush();
     
      loader1 = null;
      testClass=null;
      childObject = null;
      forceOutOfMemoryError();
View Full Code Here

 
      Method method = testClass2.getMethod("setOtherPojo",new Class[]{Object.class});
      method.invoke(rootObject,new Object[]{childObject});
     
      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      JBossObjectOutputStream objOut = new JBossObjectOutputStream(byteOut);
     
      objOut.writeObject(rootObject);
      objOut.flush();

      forceCrossedClassLoaderRelease();
     
      JBossObjectInputStream objInput = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()),loader);
      Object newObject = objInput.readObject();
View Full Code Here

 
      Method method = testClass2.getMethod("setOtherPojo",new Class[]{Object.class});
      method.invoke(rootObject,new Object[]{childObject});
     
      ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
      JBossObjectOutputStream objOut = new JBossObjectOutputStream(byteOut);
     
      objOut.writeObject(rootObject);
      objOut.flush();
     
      JBossObjectInputStream objInput = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()),loader);
      Object newObject = objInput.readObject();
    }
    testClass=null;
View Full Code Here

                original = System.currentTimeMillis();
            }

            byteOut.reset();

            JBossObjectOutputStream out = new JBossObjectOutputStream(byteOut,buffer);
            out.writeObject(myTest);
            out.flush();


            ByteArrayInputStream byteInput = new ByteArrayInputStream(byteOut.toByteArray());
            JBossObjectInputStream input = new JBossObjectInputStream(byteInput,buffer);
View Full Code Here

                original = System.currentTimeMillis();
            }

            byteOut.reset();

            JBossObjectOutputStream out = new JBossObjectOutputStream(byteOut,buffer);
            out.writeObjectUsingDataContainer(myTest);
            out.flush();


            ByteArrayInputStream byteInput = new ByteArrayInputStream(byteOut.toByteArray());
            JBossObjectInputStream input = new JBossObjectInputStream(byteInput,buffer);
View Full Code Here

      if (exec==START_LOOP)
      {
        startTime=System.currentTimeMillis();
      }

      JBossObjectOutputStream out = new JBossObjectOutputStream(byteOut,
          buffer);
      out.writeObject(myTest);
      out.flush();

      byteArray = byteOut.toByteArray();

      ByteArrayInputStream byteInput = new ByteArrayInputStream(byteArray);
View Full Code Here

TOP

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

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.