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
  • Constructor Details

    • WrappedOutputStream

      public WrappedOutputStream(OutputStream os, String charsetName)
      Constructor.
      Parameters:
      os - the output data stream to be wrapped
      charsetName - character set name, may be null if not known.
  • Method Details

    • 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 class FilterOutputStream
      Throws:
      IOException