public final class Streams
extends java.lang.Object
InputStream or OutputStream.| Modifier and Type | Field and Description |
|---|---|
static java.lang.Integer |
DEFAULT_BUFFER_SIZE |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(java.io.Closeable closeable)
Close an instance of
Closeable while swallowing the
possible IOException. |
static void |
copy(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
Copy the given
InputStream to the given
OutputStream in blocks. |
static void |
drain(org.bouncycastle.cms.CMSTypedStream stream) |
static java.io.InputStream |
fromBytes(byte[] source)
Create an
InputStream from a given byte array. |
static java.io.InputStream |
fromOutputStream(java.io.OutputStream outputStream)
Create a new
InputStream from a given
OutputStream. |
static byte[] |
getBytes(java.io.InputStream inputStream)
Retrieve the contents of an
InputStream as a byte array. |
public static void copy(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
InputStream to the given
OutputStream in blocks. After the operation the input-
and output stream are closed.inputStream - The source.outputStream - The target.public static byte[] getBytes(java.io.InputStream inputStream)
InputStream as a byte array.inputStream - The input streampublic static java.io.InputStream fromBytes(byte[] source)
InputStream from a given byte array.source - The source from which to make an InputStreamInputStreampublic static java.io.InputStream fromOutputStream(java.io.OutputStream outputStream)
InputStream from a given
OutputStream. (Pipe the output stream)outputStream - The source from which to make an InputStreamInputStreampublic static void closeQuietly(java.io.Closeable closeable)
Closeable while swallowing the
possible IOException.closeable - The instance that needs to be closed.public static void drain(org.bouncycastle.cms.CMSTypedStream stream)
Copyright © 2025 eHealth. All rights reserved.