public abstract class StreamUtils extends Object
StreamUtils class.
| Constructor and Description |
|---|
StreamUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
streamToStream(InputStream in,
OutputStream out)
Convenience method for reading data from an
InputStream
and then immediately writing that data to an OutputStream
with a default buffer size of one kilobyte (1,024 bytes). |
static void |
streamToStream(InputStream in,
OutputStream out,
int bufferSize)
Convenience method for reading data from an
InputStream
and then immediately writing that data to an OutputStream. |
static void |
streamToStream(Reader in,
Writer out)
Convenience method for reading data from a
Reader and then
immediately writing that data to a Writer with a default
buffer size of one kilobyte (1,024 chars). |
static void |
streamToStream(Reader in,
Writer out,
int bufferSize)
Convenience method for reading data from a
Reader and then
immediately writing that data to a Writer. |
public static void streamToStream(Reader in, Writer out) throws IOException
Reader and then
immediately writing that data to a Writer with a default
buffer size of one kilobyte (1,024 chars).in - a data sourceout - a data sinkIOException - if any.public static void streamToStream(Reader in, Writer out, int bufferSize) throws IOException
Reader and then
immediately writing that data to a Writer.in - a data sourceout - a data sinkbufferSize - the size of the char buffer to use for each
read/writeIOException - if any.public static void streamToStream(InputStream in, OutputStream out) throws IOException
InputStream
and then immediately writing that data to an OutputStream
with a default buffer size of one kilobyte (1,024 bytes).in - a data sourceout - a data sinkIOException - if any.public static void streamToStream(InputStream in, OutputStream out, int bufferSize) throws IOException
InputStream
and then immediately writing that data to an OutputStream.in - a data sourceout - a data sinkbufferSize - the size of the byte buffer to use for each
read/writeIOException - if any.Copyright © 2020. All rights reserved.