Examples of JBossObjectOutputStream


Examples of org.jboss.serial.io.JBossObjectOutputStream

   {
      if(log.isTraceEnabled())
      {
         log.trace("Creating JBossObjectOutputStream");
      }
      return new JBossObjectOutputStream(output);
   }
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

   }

   public ObjectOutputStream createOutput(OutputStream output) throws IOException
   {
      if (trace) { log.trace(this + " creating JBossObjectOutputStream"); }
      return new JBossObjectOutputStream(output, new StringUtilBuffer(10024, 10024));
   }
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

      file.deleteOnExit();
      log.debug("saving state to " + file);
      try
      {
         FileOutputStream fos = FOSAction.open(file);
         ObjectOutputStream out = new JBossObjectOutputStream(fos);
         try
         {
            out.writeObject(obj);
            out.flush();
         }
         finally
         {
            out.close();
         }
      }
      catch(IOException e)
      {
         throw new RuntimeException("failed to store object " + obj.getId(), e);
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

      {
         FileOutputStream fos = FOSAction.open(file);
         // todo need to rewrite SessionObjectOutputStream to support EJB3 classes
         ObjectOutputStream out;

         out = new JBossObjectOutputStream(fos, false);

         try
         {
            out.writeObject(ctx);
            out.flush();
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

   {
      if (trace) { log.trace(this + " creating JBossObjectOutputStream"); }

      if (SecurityUtility.skipAccessControl())
      {
         return new JBossObjectOutputStream(output, new StringUtilBuffer(10024, 10024));
      }
     
      try
      {
         return (ObjectOutputStream)AccessController.doPrivileged( new PrivilegedExceptionAction()
         {
            public Object run() throws Exception
            {
               return new JBossObjectOutputStream(output, new StringUtilBuffer(10024, 10024));
            }
         });
      }
      catch (PrivilegedActionException e)
      {
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

      {
         FileOutputStream fos = FOSAction.open(file);
         // todo need to rewrite SessionObjectOutputStream to support EJB3 classes
         ObjectOutputStream out;

         out = new JBossObjectOutputStream(fos, false);

         try
         {
            out.writeObject(ctx);
            out.flush();
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

      {
         FileOutputStream fos = FOSAction.open(file);
         // todo need to rewrite SessionObjectOutputStream to support EJB3 classes
         ObjectOutputStream out;

         out = new JBossObjectOutputStream(fos, false);

         try
         {
            out.writeObject(ctx);
            out.flush();
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

            fos = new FileOutputStream(file);
            bufStream = new BufferedOutputStream(fos, 200000);
            if (useJBS)
            {
                oos = new JBossObjectOutputStream(bufStream);
            } else
            {
                oos = new ObjectOutputStream(bufStream);
            }
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

       String largeString = sb.toString();
       assertEquals(stringSize, largeString.length());
      
       ByteArrayOutputStream byteArray = new ByteArrayOutputStream();
       JBossObjectOutputStream objOut = new JBossObjectOutputStream(byteArray);
      
       objOut.writeObject(largeString);
       objOut.close();
      
       ByteArrayInputStream byteInput = new ByteArrayInputStream(byteArray.toByteArray());
       JBossObjectInputStream objInp = new JBossObjectInputStream(byteInput);
      
       String newString = (String)objInp.readObject();
View Full Code Here

Examples of org.jboss.serial.io.JBossObjectOutputStream

   }

  // do not change these testcases as they test the interface used by JBossRemoting
    private void doTestJBossDataContainerWithSmartClone2(Object dataObject) throws Exception
    {
      JBossObjectOutputStream objInput = new JBossObjectOutputStream(null);
      Object newObject = objInput.smartClone(dataObject);


      if (!(dataObject instanceof String) && !(dataObject instanceof String[]))
      {
        assertEquals(dataObject,newObject);
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.