Package org.jboss.serial.io

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


   }

   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

      throw new IOException("序列化类文件找不到:" + e.getMessage());
    }
  }

  public void serialize(Serializable obj, OutputStream out) throws IOException {
    ObjectOutputStream oo = new JBossObjectOutputStream(out);
    oo.writeObject(obj);
    oo.flush();
  }
View Full Code Here

  //  Serialize using Java mechanism
  //
    try
    {
      ByteArrayOutputStream out = new ByteArrayOutputStream();
        JBossObjectOutputStream oos = new JBossObjectOutputStream(out);
        oos.writeObject(serializable);
        oos.close();
       
        return Base64.encodeToString(out.toByteArray(), false);
    }
    catch(IOException ex)
    {
View Full Code Here

    }

  }

  public ObjectOutputStream getObjectOutputStream(OutputStream stream) throws IOException {
    return new JBossObjectOutputStream(stream);
  }
View Full Code Here

   }

   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

      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

   public byte[] serializeToByte(final Object target) throws Exception
   {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      OutputStream oos = new ObjectOutputStream(baos);
      JBossObjectOutputStream jbos = new JBossObjectOutputStream(oos);
      jbos.writeObject(target);
      jbos.close();  
     
      return baos.toByteArray();
     
   }
View Full Code Here

      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

   {
      if(log.isTraceEnabled())
      {
         log.trace("Creating JBossObjectOutputStream");
      }
      return new JBossObjectOutputStream(output);
   }
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.