Class HttpOutputStream

java.lang.Object
java.io.OutputStream
com.ibm.wsspi.http.HttpOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public abstract class HttpOutputStream extends OutputStream
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Clear any current buffer content in the stream.
    abstract void
    flush(boolean ignoreFlag)
     
    abstract void
    Flush the output array of buffers to the network below.
    abstract void
    Write the current set of response headers.
    abstract long
    Query the amount of bytes currently buffered so far.
    abstract int
    Query the amount of data this stream is configured to buffer before an automatic write happens.
    abstract long
    Query the amount of bytes written so far.
    abstract boolean
    Test whether this stream has any current data buffered, waiting to be written out.
    abstract boolean
    Query whether this stream is closed already or not.
    abstract void
    setBufferSize(int size)
    Set the amount of data to buffer internally before the stream itself initiates a flush.
    abstract void
    setContentLength(long length)
     
    abstract void
    setIsClosing(boolean b)
     
    abstract void
    Write a file channel onto the output stream.

    Methods inherited from class java.io.OutputStream

    close, flush, write, write, write

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HttpOutputStream

      public HttpOutputStream()
  • Method Details

    • setIsClosing

      public abstract void setIsClosing(boolean b)
    • getBufferSize

      public abstract int getBufferSize()
      Query the amount of data this stream is configured to buffer before an automatic write happens.
      Returns:
      int
    • setBufferSize

      public abstract void setBufferSize(int size)
      Set the amount of data to buffer internally before the stream itself initiates a flush. A zero size means no buffer is done, each write call will flush data.
      Parameters:
      size -
      Throws:
      IllegalStateException - if already writing data or closed
    • clear

      public abstract void clear()
      Clear any current buffer content in the stream.
    • getBytesWritten

      public abstract long getBytesWritten()
      Query the amount of bytes written so far.
      Returns:
      long
    • getBufferedCount

      public abstract long getBufferedCount()
      Query the amount of bytes currently buffered so far.
      Returns:
      long
    • hasBufferedContent

      public abstract boolean hasBufferedContent()
      Test whether this stream has any current data buffered, waiting to be written out.
      Returns:
      boolean
    • writeFile

      public abstract void writeFile(FileChannel fc) throws IOException
      Write a file channel onto the output stream.
      Parameters:
      fc -
      Throws:
      IOException
    • flushHeaders

      public abstract void flushHeaders() throws IOException
      Write the current set of response headers. If the headers have already been sent, this is a no-op.
      Throws:
      IOException
    • flushBuffers

      public abstract void flushBuffers() throws IOException
      Flush the output array of buffers to the network below.
      Throws:
      IOException
    • isClosed

      public abstract boolean isClosed()
      Query whether this stream is closed already or not.
      Returns:
      boolean
    • flush

      public abstract void flush(boolean ignoreFlag) throws IOException
      Parameters:
      ignoreFlag -
      Throws:
      IOException
    • setContentLength

      public abstract void setContentLength(long length)
      Parameters:
      length -