|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmorfologik.util.FileUtils
public final class FileUtils
Utility functions.
| Method Summary | |
|---|---|
static void |
assertExists(File fsaFile,
boolean requireFile,
boolean requireDirectory)
Checks if the given file exists. |
static void |
close(Closeable... closeables)
Force any non-null closeables. |
static byte |
readByte(InputStream in)
Read exactly one byte from the input stream. |
static byte[] |
readFully(InputStream stream)
Reads all bytes from an input stream (until EOF). |
static void |
readFully(InputStream in,
byte[] array)
Read enough bytes to fill array If there are not enough
bytes, throw an exception. |
static int |
readInt(InputStream in)
Read exactly 4 bytes from the input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void assertExists(File fsaFile,
boolean requireFile,
boolean requireDirectory)
throws IOException
IOExceptionpublic static void close(Closeable... closeables)
public static byte[] readFully(InputStream stream)
throws IOException
IOException
public static void readFully(InputStream in,
byte[] array)
throws IOException
array If there are not enough
bytes, throw an exception.
IOException
public static int readInt(InputStream in)
throws IOException
IOException
public static byte readByte(InputStream in)
throws IOException
EOFException - if EOF is reached.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||