public class IOUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getStreamAsByteArray(InputStream stream)
Deprecated.
Returns the contents of the input stream as byte array.
|
static byte[] |
getStreamAsByteArray(InputStream stream,
int length)
Deprecated.
Returns the contents of the input stream as byte array.
|
static int |
readFully(InputStream in,
byte[] b)
Deprecated.
Reads into a byte array.
|
static int |
readFully(InputStream in,
byte[] b,
int off,
int len)
Deprecated.
Same as the normal in.read(b, off, len), but tries to ensure that the entire len
number of bytes is read.
|
public static int readFully(InputStream in, byte[] b) throws IOException
IOExceptionreadFully(java.io.InputStream, byte[], int, int)public static int readFully(InputStream in, byte[] b, int off, int len) throws IOException
IOExceptionpublic static byte[] getStreamAsByteArray(InputStream stream) throws IOException
stream - the InputStreamIOExceptionpublic static byte[] getStreamAsByteArray(InputStream stream, int length) throws IOException
stream - the InputStreamlength - the number of bytes to copy, if length < 0, the number is unlimitedIOExceptionCopyright ? The Apache Software Foundation. All Rights Reserved.