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
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deactivates any further data collecting.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 Details
-
WrappedOutputStream
Constructor.- Parameters:
os
- the output data stream to be wrappedcharsetName
- character set name, may benull
if not known.
-
-
Method Details
-
getCollectedPayload
Returns the collected message payload.- Returns:
- SOAP payload as XML String.
-
deactivate
public void deactivate()Deactivates any further data collecting. -
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-