public class IoUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
EOF |
| Modifier and Type | Method and Description |
|---|---|
static int |
copy(InputStream input,
OutputStream output)
Copies bytes
|
static byte[] |
toByteArray(InputStream input)
Gets the contents of an InputStream as a byte[].
|
static byte[] |
toByteArray(InputStream input,
int size)
Gets the contents of an InputStream as a byte[].
|
public static final int EOF
public static byte[] toByteArray(InputStream input) throws IOException
input - IOExceptionpublic static byte[] toByteArray(InputStream input, int size) throws IOException
input - size - IOExceptionpublic static int copy(InputStream input, OutputStream output) throws IOException
input - output - IOExceptionCopyright © 2018–2022 Alibaba Group. All rights reserved.