|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.foray.common.IOUtil
public final class IOUtil
I/O utilities. This class should be replaced as soon as Jakarta Commons IO announces its first release. TODO: Replace with Jakarta Commons I/O.
| Method Summary | |
|---|---|
static String |
baseFileName(String fileName)
Strips the extension off the end of a file name, returning the base portion of the file name. |
static void |
copyStream(InputStream in,
OutputStream out)
Copies the contents of the InputStream over to the OutputStream. |
static byte[] |
toByteArray(InputStream in,
int initialTargetBufferSize)
Loads the contents of the InputStream to a byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void copyStream(InputStream in,
OutputStream out)
throws IOException
in - InputStream to read fromout - OutputStream to write to
IOException - In case of an I/O problem
public static byte[] toByteArray(InputStream in,
int initialTargetBufferSize)
throws IOException
in - InputStream to read frominitialTargetBufferSize - initial number of bytes to allocate
(expected size to avoid a lot of reallocations)
IOException - In case of an I/O problempublic static String baseFileName(String fileName)
fileName - The file name with the extension intact.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||