Package org.commonlib.io

Examples of org.commonlib.io.ByteBufferOutputStream


   * @throws Exception
   */
  public static byte[] writeObjectToBytes(Serializable toWrite)
     throws Exception
  {
    ByteBufferOutputStream fos = new ByteBufferOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(fos);
    try
    {
      oos.writeObject(toWrite);
    }
    finally
    {
      oos.close();
      fos.close();
    }
    return fos.getBytes();
  }
View Full Code Here

TOP

Related Classes of org.commonlib.io.ByteBufferOutputStream

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.