public class IOUtils
extends java.lang.Object
Constructor and Description |
---|
IOUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
readFully(java.io.InputStream is,
int length,
boolean readAll)
Read up to
length of bytes from in
until EOF is detected. |
public static byte[] readFully(java.io.InputStream is, int length, boolean readAll) throws java.io.IOException
length
of bytes from in
until EOF is detected.is
- 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_VALUEjava.io.IOException
- Any IO error or a premature EOF is detectedCopyright © 2025. All rights reserved.