public class IOUtil
extends java.lang.Object
| Constructor and Description | 
|---|
| IOUtil() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | close(java.io.InputStream is) | 
| static void | close(java.io.OutputStream os) | 
| static void | close(java.io.Reader reader) | 
| static void | close(java.io.Writer writer) | 
| static java.io.Serializable | deserialize(byte[] buffer)Deserializes the specified buffer into a Serializable Java object. | 
| static java.io.Serializable | deserialize(byte[] buffer,
           boolean compressed)Deserializes the specified buffer into a Serializable Java object. | 
| static byte[] | serialize(java.io.Serializable object)Serializes the specified Serializable Java object into a byte buffer. | 
| static byte[] | serialize(java.io.Serializable object,
         boolean compress)Serializes the specified Serializable Java object into a byte buffer. | 
public static void close(java.io.InputStream is)
public static void close(java.io.Reader reader)
public static void close(java.io.OutputStream os)
public static void close(java.io.Writer writer)
public static byte[] serialize(java.io.Serializable object)
                        throws java.io.IOException
object - the Serializable Java object to serialize.java.io.IOExceptionpublic static byte[] serialize(java.io.Serializable object,
                               boolean compress)
                        throws java.io.IOException
object - the Serializable Java object to serialize.compress - whether the compress the buffer stream (GZIP)java.io.IOExceptionpublic static java.io.Serializable deserialize(byte[] buffer)
                                        throws java.io.IOException,
                                               java.lang.ClassNotFoundException
buffer - the serialized Java object to deserialize.java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic static java.io.Serializable deserialize(byte[] buffer,
                                               boolean compressed)
                                        throws java.io.IOException,
                                               java.lang.ClassNotFoundException
buffer - the serialized Java object to deserialize.compressed - whether the buffer stream is compressed (GZIP)java.io.IOExceptionjava.lang.ClassNotFoundException