com.threerings.export.util
Class ExportUtil

java.lang.Object
  extended by com.threerings.export.util.ExportUtil

public class ExportUtil
extends Object

Some general utility methods relating to exporting.


Constructor Summary
ExportUtil()
           
 
Method Summary
static Object fromBytes(byte[] bytes)
          Parses a byte array containing a binary export and returns the decoded object.
static Object fromString(String string)
          Parses a string containing an XML export and returns the decoded object.
static byte[] toBytes(Object object)
          Converts an exportable object to a byte array containing the exported binary representation of the object.
static byte[] toBytes(Object object, boolean compress)
          Converts an exportable object to a byte array containing the exported binary representation of the object.
static String toString(Object object)
          Converts an exportable object to a string containing the exported XML representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportUtil

public ExportUtil()
Method Detail

toString

public static String toString(Object object)
Converts an exportable object to a string containing the exported XML representation of the object. If an error occurs, a warning will be logged and null will be returned.


fromString

public static Object fromString(String string)
Parses a string containing an XML export and returns the decoded object. If an error occurs, a warning will be logged and null will be returned.


toBytes

public static byte[] toBytes(Object object)
Converts an exportable object to a byte array containing the exported binary representation of the object. If an error occurs, a warning will be logged and null will be returned.


toBytes

public static byte[] toBytes(Object object,
                             boolean compress)
Converts an exportable object to a byte array containing the exported binary representation of the object. If an error occurs, a warning will be logged and null will be returned.


fromBytes

public static Object fromBytes(byte[] bytes)
Parses a byte array containing a binary export and returns the decoded object. If an error occurs, a warning will be logged and null will be returned.



Copyright © 2011. All Rights Reserved.