Modifier and Type | Method and Description |
---|---|
static void |
copy(InputStream input,
OutputStream output)
Copies the contents from an InputStream to an OutputStream.
|
static void |
copyWithClose(InputStream input,
OutputStream output)
Copies the contents from an InputStream to an OutputStream and closes both streams.
|
public static void copy(InputStream input, OutputStream output) throws IOException
OutputStream
will be fully flushed.input
- The InputStream
output
- The OutputStream
IOException
- If a problem occurred during any I/O operationspublic static void copyWithClose(InputStream input, OutputStream output) throws IOException
input
- The InputStream
output
- The OutputStream
IOException
- If a problem occurred during any I/O operations during the copy, but on closing the streams these
will be ignored and logged at Level.FINER
Copyright © 2021 JBoss by Red Hat. All rights reserved.