public abstract class StreamUtils
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_BUFFER_SIZE
Default value is 2048.
|
构造器和说明 |
---|
StreamUtils() |
限定符和类型 | 方法和说明 |
---|---|
static void |
copy(java.io.InputStream input,
java.io.OutputStream output)
Copies information from the input stream to the output stream using
a default buffer size of 2048 bytes.
|
static void |
copy(java.io.InputStream input,
java.io.OutputStream output,
int bufferSize)
Copies information from the input stream to the output stream using
the specified buffer size
|
static void |
copyThenClose(java.io.InputStream input,
java.io.OutputStream output)
Copies information between specified streams and then closes
both of the streams.
|
static byte[] |
getBytes(java.io.InputStream input) |
public static final int DEFAULT_BUFFER_SIZE
public static void copy(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void copy(java.io.InputStream input, java.io.OutputStream output, int bufferSize) throws java.io.IOException
java.io.IOException
public static void copyThenClose(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static byte[] getBytes(java.io.InputStream input) throws java.io.IOException
java.io.IOException