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
-
IIO()
-
-
call(URL, Serializable)
- RPC using Serializable.
-
copy(InputStream, byte[])
-
Copies 'in' to a byte array until EOF using a fixed-size 'buffer'.
-
copy(InputStream, OutputStream, byte[])
-
Copies 'in' to 'out' using a fixed-size 'buffer' until EOF.
-
copy(InputStream, OutputStream, int, byte[])
-
Copies 'byteCount' number of bytes from 'in' to 'out' using given
fixed-size 'buffer'.
-
loadData(String)
-
Loads a file data into a byte array.
-
loadObject(String)
-
Loads a Serializable from a file.
-
readObject(InputStream)
-
Reads an Object from 'in'.
-
saveData(byte[], String)
-
Saves a byte array data to a file.
-
saveObject(Serializable, String)
-
Saves a Serializable to a file.
-
tryClose(InputStream)
-
Tries to close an InputStream if not null.
-
tryClose(OutputStream)
-
Tries to close an OutputStream if not null.
-
writeObject(Serializable, OutputStream)
-
Writes a Serializable to 'out'.
IIO
public IIO()
tryClose
public static final void tryClose(InputStream in)
- Tries to close an InputStream if not null.
tryClose
public static final void tryClose(OutputStream out)
- Tries to close an OutputStream if not null.
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'.
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.
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'.
readObject
public static final Object readObject(InputStream in) throws Exception
- Reads an Object from 'in'.
writeObject
public static final void writeObject(Serializable object,
OutputStream out) throws Exception
- Writes a Serializable to 'out'.
saveObject
public static final void saveObject(Serializable object,
String fileName) throws Exception
- Saves a Serializable to a file.
loadObject
public static final Object loadObject(String fileName) throws Exception
- Loads a Serializable from a file.
saveData
public static final void saveData(byte data[],
String fileName) throws Exception
- Saves a byte array data to a file.
loadData
public static final byte[] loadData(String fileName) throws Exception
- Loads a file data into a byte array.
call
public static final Object call(URL url,
Serializable arg) throws Exception
- RPC using Serializable.
All Packages Class Hierarchy This Package Previous Next Index