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