Package winterwell.utils.io

Examples of winterwell.utils.io.FastByteArrayOutputStream


   * @param object
   * @return a copy of object, which should share no structure
   * @testedby {@link UtilsTest#testCopy()}
   */
  public static <X> X copy(X object) {
    FastByteArrayOutputStream out = new FastByteArrayOutputStream();
    XStreamUtils.xstream().toXML(object, out);
    FastByteArrayInputStream in = new FastByteArrayInputStream(
        out.getByteArray(), out.getSize());
    Object copy = XStreamUtils.xstream().fromXML(in);
    return (X) copy;
  }
View Full Code Here

TOP

Related Classes of winterwell.utils.io.FastByteArrayOutputStream

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.