Package org.mule.soap.internal.util
Class CopyStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.mule.soap.internal.util.CopyStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
This class allows converting an OutputStream into an InputStream without having a duplicated buffer in memory at any time.
-
Field Summary
Fields inherited from class java.io.ByteArrayOutputStream
buf, count -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet an input stream based on the contents of this output stream.Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeToMethods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
CopyStream
public CopyStream()
-
-
Method Details
-
toInputStream
Get an input stream based on the contents of this output stream. Do not use the output stream after calling this method. Consider the output stream as closed after using this method.- Returns:
- an
InputStream
-