WriteOnCloseOutputStream (Apache CXF JavaDoc 4.1.0-SNAPSHOT API)
Description: declaration: package: org.apache.cxf.io, class: WriteOnCloseOutputStream

Package org.apache.cxf.io

# Class WriteOnCloseOutputStream

java.lang.Object
java.io.OutputStream
org.apache.cxf.io.CachedOutputStream
org.apache.cxf.io.WriteOnCloseOutputStream

All Implemented Interfaces:
  `Closeable`, `Flushable`, `AutoCloseable`

public class WriteOnCloseOutputStream extends CachedOutputStream
This outputstream implementation will cache the message until close() is called, at which point it will write the message to the OutputStream supplied via the constructor.

- ## Field Summary

  ### Fields inherited from class org.apache.cxf.io.CachedOutputStream

  `currentStream, outputLocked`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WriteOnCloseOutputStream(OutputStream stream)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `doClose()`
  Perform any actions required on stream closure (handle response etc.)

  ### Methods inherited from class org.apache.cxf.io.CachedOutputStream

  `close, copyStream, deregisterCallback, doFlush, equals, flush, getBytes, getCallbacks, getInputStream, getOut, getTempFile, getThreshold, hashCode, holdTempFile, isThresholdSysPropSet, lockOutputStream, onWrite, postClose, registerCallback, releaseTempFileHold, resetOut, setCipherTransformation, setDefaultCipherTransformation, setDefaultMaxSize, setDefaultThreshold, setMaxSize, setOutputDir, setThreshold, size, toString, write, write, write, writeCacheTo, writeCacheTo, writeCacheTo, writeCacheTo, writeCacheTo`

  ### Methods inherited from class java.io.OutputStream

  `nullOutputStream`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### WriteOnCloseOutputStream

    public WriteOnCloseOutputStream(OutputStream stream)

- ## Method Details

  - ### doClose

    protected void doClose() throws IOException
    Description copied from class: `CachedOutputStream`
    Perform any actions required on stream closure (handle response etc.)
    Overrides:
      `doClose` in class `CachedOutputStream`
    Throws:
      `IOException`