|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.anthonyeden.lib.util.IOUtilities
Useful IO utilities.
| Method Summary | |
static void |
close(java.io.InputStream s)
Close the given stream if the stream is not null. |
static void |
close(java.io.OutputStream s)
Close the given stream if the stream is not null. |
static void |
close(java.io.Reader s)
Close the given stream if the stream is not null. |
static void |
close(java.io.Writer s)
Close the given stream if the stream is not null. |
static java.lang.String |
getStringFromReader(java.io.Reader in)
Read the data from the given reader and return it is a single String. |
static byte[] |
readData(java.io.File file)
Read the data from the given file into a byte array and return the array. |
static byte[] |
readData(org.apache.commons.vfs.FileObject file)
Read the data from the given file into a byte array and return the array. |
static void |
writeData(java.io.File file,
byte[] data)
Write the byte array to the given file. |
static void |
writeData(org.apache.commons.vfs.FileObject file,
byte[] data)
Write the byte array to the given file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void close(java.io.InputStream s)
s - The streampublic static void close(java.io.Reader s)
s - The streampublic static void close(java.io.OutputStream s)
s - The streampublic static void close(java.io.Writer s)
s - The stream
public static byte[] readData(java.io.File file)
throws java.io.IOException
file - The file
java.io.IOException
public static byte[] readData(org.apache.commons.vfs.FileObject file)
throws java.io.IOException
file - The file
java.io.IOException
public static void writeData(java.io.File file,
byte[] data)
throws java.io.IOException
file - The file to write todata - The data array
java.io.IOException
public static void writeData(org.apache.commons.vfs.FileObject file,
byte[] data)
throws java.io.IOException
file - The file to write todata - The data array
java.io.IOException
public static java.lang.String getStringFromReader(java.io.Reader in)
throws java.io.IOException
in - The Reader
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||