|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.fgov.ehealth.etee.crypto.utils.Streams
public final class Streams
A utility class that simplifies various operations on instances of
InputStream or OutputStream.
| Field Summary | |
|---|---|
static java.lang.Integer |
DEFAULT_BUFFER_SIZE
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Integer DEFAULT_BUFFER_SIZE
| Method Detail |
|---|
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 stream
public static java.io.InputStream fromBytes(byte[] source)
InputStream from a given byte array.
source - The source from which to make an InputStream
InputStreampublic 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 InputStream
InputStreampublic 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||