public class IoUtils
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static int |
EOF |
限定符和类型 | 方法和说明 |
---|---|
static int |
copy(java.io.InputStream input,
java.io.OutputStream output)
Copies bytes
|
static byte[] |
toByteArray(java.io.InputStream input)
Gets the contents of an InputStream as a byte[].
|
static byte[] |
toByteArray(java.io.InputStream input,
int size)
Gets the contents of an InputStream as a byte[].
|
public static final int EOF
public static byte[] toByteArray(java.io.InputStream input) throws java.io.IOException
input
- InputStreamjava.io.IOException
- IOExceptionpublic static byte[] toByteArray(java.io.InputStream input, int size) throws java.io.IOException
input
- InputStreamsize
- intjava.io.IOException
- IOExceptionpublic static int copy(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOException
input
- InputStreamoutput
- OutputStreamjava.io.IOException
- IOException