| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
readFully(InputStream is,
int length,
boolean readAll)
Read up to
length of bytes from in
until EOF is detected. |
public IOUtils()
public static byte[] readFully(InputStream is, int length, boolean readAll) throws IOException
length of bytes from in
until EOF is detected.in - input stream, must not be nulllength - number of bytes to read, -1 or Integer.MAX_VALUE means
read as much as possiblereadAll - if true, an EOFException will be thrown if not enough
bytes are read. Ignored when length is -1 or Integer.MAX_VALUEIOException - Any IO error or a premature EOF is detected