All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.micronova.util.IIO

java.lang.Object
   |
   +----com.micronova.util.IIO

public class IIO
extends Object
Miscellaneous IO-related static methods.

Version:
1.0

Constructor Index

 o IIO()

Method Index

 o call(URL, Serializable)
RPC using Serializable.
 o copy(InputStream, byte[])
Copies 'in' to a byte array until EOF using a fixed-size 'buffer'.
 o copy(InputStream, OutputStream, byte[])
Copies 'in' to 'out' using a fixed-size 'buffer' until EOF.
 o copy(InputStream, OutputStream, int, byte[])
Copies 'byteCount' number of bytes from 'in' to 'out' using given fixed-size 'buffer'.
 o loadData(String)
Loads a file data into a byte array.
 o loadObject(String)
Loads a Serializable from a file.
 o readObject(InputStream)
Reads an Object from 'in'.
 o saveData(byte[], String)
Saves a byte array data to a file.
 o saveObject(Serializable, String)
Saves a Serializable to a file.
 o tryClose(InputStream)
Tries to close an InputStream if not null.
 o tryClose(OutputStream)
Tries to close an OutputStream if not null.
 o writeObject(Serializable, OutputStream)
Writes a Serializable to 'out'.

Constructors

 o IIO
 public IIO()

Methods

 o tryClose
 public static final void tryClose(InputStream in)
Tries to close an InputStream if not null.

 o tryClose
 public static final void tryClose(OutputStream out)
Tries to close an OutputStream if not null.

 o copy
 public static final void copy(InputStream in,
                               OutputStream out,
                               int byteCount,
                               byte buffer[]) throws Exception
Copies 'byteCount' number of bytes from 'in' to 'out' using given fixed-size 'buffer'. Throws an IOException("Truncated Input") if 'in' is shorter than 'byteCount'.

 o copy
 public static final int copy(InputStream in,
                              OutputStream out,
                              byte buffer[]) throws Exception
Copies 'in' to 'out' using a fixed-size 'buffer' until EOF. Returns the number of bytes copied.

 o copy
 public static final byte[] copy(InputStream in,
                                 byte buffer[]) throws Exception
Copies 'in' to a byte array until EOF using a fixed-size 'buffer'.

 o readObject
 public static final Object readObject(InputStream in) throws Exception
Reads an Object from 'in'.

 o writeObject
 public static final void writeObject(Serializable object,
                                      OutputStream out) throws Exception
Writes a Serializable to 'out'.

 o saveObject
 public static final void saveObject(Serializable object,
                                     String fileName) throws Exception
Saves a Serializable to a file.

 o loadObject
 public static final Object loadObject(String fileName) throws Exception
Loads a Serializable from a file.

 o saveData
 public static final void saveData(byte data[],
                                   String fileName) throws Exception
Saves a byte array data to a file.

 o loadData
 public static final byte[] loadData(String fileName) throws Exception
Loads a file data into a byte array.

 o call
 public static final Object call(URL url,
                                 Serializable arg) throws Exception
RPC using Serializable.


All Packages  Class Hierarchy  This Package  Previous  Next  Index