Class WrappedOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.openehealth.ipf.commons.ihe.ws.cxf.payload.WrappedOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class WrappedOutputStream extends FilterOutputStream
An implementation of output stream which serves as a proxy for another output stream instance and collects the data pieces to be written in a string buffer (these pieces are XML and/or MIME artifacts).- Author:
- Dmytro Rud
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description WrappedOutputStream(OutputStream os, String charsetName)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deactivate()
Deactivates any further data collecting.String
getCollectedPayload()
Returns the collected message payload.void
write(byte[] b, int off, int len)
-
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
WrappedOutputStream
public WrappedOutputStream(OutputStream os, String charsetName)
Constructor.- Parameters:
os
- the output data stream to be wrappedcharsetName
- character set name, may benull
if not known.
-
-
Method Detail
-
getCollectedPayload
public String getCollectedPayload()
Returns the collected message payload.- Returns:
- SOAP payload as XML String.
-
deactivate
public void deactivate()
Deactivates any further data collecting.
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
-