public class StreamUtils extends Object
| Modifier and Type | Field and Description | 
|---|---|
static int | 
DEFAULT_CHUNK_SIZE
Default size to use for reading buffers. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static long | 
copy(InputStream inputStream,
    OutputStream outputStream)
Copy the inputStream to the outputStream. 
 | 
static long | 
copy(InputStream inputStream,
    OutputStream outputStream,
    int bufferSize)
Copy the inputStream to the outputStream using a buffer of the specified size 
 | 
static long | 
copy(Reader reader,
    Writer writer)
Copy the reader to the writer. 
 | 
static long | 
copy(Reader reader,
    Writer writer,
    int bufferSize)
Copy the reader to the writer using a buffer of the specified size 
 | 
public static final int DEFAULT_CHUNK_SIZE
public static long copy(InputStream inputStream, OutputStream outputStream) throws IOException
DEFAULT_CHUNK_SIZE).inputStream - The input stream to readoutputStream - The output stream to write toIOException - If a problem occurred accessing either streampublic static long copy(InputStream inputStream, OutputStream outputStream, int bufferSize) throws IOException
inputStream - The input stream to readoutputStream - The output stream to write tobufferSize - The size of the buffer to use for readingIOException - If a problem occurred accessing either streampublic static long copy(Reader reader, Writer writer) throws IOException
DEFAULT_CHUNK_SIZE).reader - The reader to read fromwriter - The writer to write toIOException - If a problem occurred accessing reader or writerpublic static long copy(Reader reader, Writer writer, int bufferSize) throws IOException
reader - The reader to read fromwriter - The writer to write tobufferSize - The size of the buffer to use for readingIOException - If a problem occurred accessing either streamCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.