|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fulcrum.jce.crypto.StreamUtil
public final class StreamUtil
Helper class to provde generic stream functions.
Constructor Summary | |
---|---|
StreamUtil()
|
Method Summary | |
---|---|
static long |
copy(InputStream is,
OutputStream os)
Pumps the input stream to the output stream. |
static InputStream |
createInputStream(Object source)
Create an input stream supporting the following types String (using the UTF-8 encoded content) File byte[] char[] ByteArrayOutputStream InputStream |
static OutputStream |
createOutputStream(Object target)
Create an output stream supporting the following types File String OutputStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamUtil()
Method Detail |
---|
public static InputStream createInputStream(Object source) throws IOException
source
- the source object
IOException
- creating the input stream failedpublic static OutputStream createOutputStream(Object target) throws IOException
target
- the target object
IOException
- creating the output stream failedpublic static long copy(InputStream is, OutputStream os) throws IOException
is
- the source input streamos
- the target output stream
IOException
- the copying failed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |