public final class IOUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
EOF
Represents the end-of-file or stream.
|
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
copy(InputStream input,
OutputStream output)
Copies bytes from the
InputStream to an OutputStream. |
static long |
copy(InputStream input,
OutputStream output,
byte[] buffer)
Copies bytes from the
InputStream to an OutputStream. |
static long |
copy(InputStream input,
OutputStream output,
int bufferSize)
Copies bytes from the
InputStream to an OutputStream. |
static byte[] |
toByteArray(InputStream inputStream)
Returns contents of the specified
InputStream as a byte array. |
public static final int EOF
public static byte[] toByteArray(@NotNull InputStream inputStream)
InputStream as a byte array.inputStream - InputStreamInputStream as a byte arraypublic static long copy(@NotNull InputStream input, @NotNull OutputStream output)
InputStream to an OutputStream.input - InputStreamoutput - OutputStreampublic static long copy(@NotNull InputStream input, @NotNull OutputStream output, int bufferSize)
InputStream to an OutputStream.input - InputStreamoutput - OutputStreambufferSize - size of buffer used to copy bytes from the InputStream to the OutputStreampublic static long copy(@NotNull InputStream input, @NotNull OutputStream output, @NotNull byte[] buffer)
InputStream to an OutputStream.input - InputStreamoutput - OutputStreambuffer - buffer used to copy bytes from the InputStream to the OutputStreamCopyright © 2020. All rights reserved.