public class IOUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
IOUtils.StreamHandler
StreamHandler defines a generic method to handle the stream data
|
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(InputStream inputStream,
OutputStream outputStream)
copies the input stream to the output stream
|
static void |
copy(InputStream inputStream,
OutputStream outputStream,
byte[] buffer)
copies the input stream to the output stream using a custom buffer size
|
static void |
copy(InputStream inputStream,
OutputStream outputStream,
byte[] buffer,
IOUtils.StreamHandler addtionalHandling)
copies the input stream to the output stream using a custom buffer size and applying additional stream handling
|
static void |
process(InputStream inputStream,
IOUtils.StreamHandler handler)
generic processing of a stream
|
static void |
process(InputStream inputStream,
IOUtils.StreamHandler handler,
byte[] buffer)
generic processing of a stream with a custom buffer
|
public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException
inputStream - the source streamoutputStream - the target streamIOExceptionpublic static void copy(InputStream inputStream, OutputStream outputStream, byte[] buffer) throws IOException
inputStream - the source streamoutputStream - the target strembuffer - the custom bufferIOExceptionpublic static void copy(InputStream inputStream, OutputStream outputStream, byte[] buffer, IOUtils.StreamHandler addtionalHandling) throws IOException
inputStream - the source streamoutputStream - the target streambuffer - the custom bufferaddtionalHandling - a stream handler that allows additional handling of the streamIOExceptionpublic static void process(InputStream inputStream, IOUtils.StreamHandler handler) throws IOException
inputStream - the input stream to processhandler - the handler to apply on the streamIOExceptionpublic static void process(InputStream inputStream, IOUtils.StreamHandler handler, byte[] buffer) throws IOException
inputStream - the input stream to processhandler - the handler to apply on the streambuffer - the buffer to use for stream handlingIOExceptionCopyright © 2015. All rights reserved.