public abstract class StreamUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE
Default value is 2048.
|
Constructor and Description |
---|
StreamUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(InputStream input,
OutputStream output)
Copies information from the input stream to the output stream using
a default buffer size of 2048 bytes.
|
static void |
copy(InputStream input,
OutputStream output,
int bufferSize)
Copies information from the input stream to the output stream using
the specified buffer size
|
static void |
copyThenClose(InputStream input,
OutputStream output)
Copies information between specified streams and then closes
both of the streams.
|
static byte[] |
getBytes(InputStream input) |
public static final int DEFAULT_BUFFER_SIZE
public static void copy(InputStream input, OutputStream output) throws IOException
IOException
public static void copy(InputStream input, OutputStream output, int bufferSize) throws IOException
IOException
public static void copyThenClose(InputStream input, OutputStream output) throws IOException
IOException
public static byte[] getBytes(InputStream input) throws IOException
IOException
Copyright © 2006–2014 FDV Solutions. All rights reserved.