Package com.ibm.wsspi.http
Class HttpOutputStream
- java.lang.Object
- 
- java.io.OutputStream
- 
- com.ibm.wsspi.http.HttpOutputStream
 
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.io.Flushable,- java.lang.AutoCloseable
 
 public abstract class HttpOutputStream extends java.io.OutputStream
- 
- 
Constructor SummaryConstructors Constructor Description HttpOutputStream()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidclear()Clear any current buffer content in the stream.abstract voidflush(boolean ignoreFlag)abstract voidflushBuffers()Flush the output array of buffers to the network below.abstract voidflushHeaders()Write the current set of response headers.abstract longgetBufferedCount()Query the amount of bytes currently buffered so far.abstract intgetBufferSize()Query the amount of data this stream is configured to buffer before an automatic write happens.abstract longgetBytesWritten()Query the amount of bytes written so far.abstract booleanhasBufferedContent()Test whether this stream has any current data buffered, waiting to be written out.abstract booleanisClosed()Query whether this stream is closed already or not.abstract voidsetBufferSize(int size)Set the amount of data to buffer internally before the stream itself initiates a flush.abstract voidsetContentLength(long length)abstract voidsetIsClosing(boolean b)abstract voidwriteFile(java.nio.channels.FileChannel fc)Write a file channel onto the output stream.
 
- 
- 
- 
Method Detail- 
setIsClosingpublic abstract void setIsClosing(boolean b) 
 - 
getBufferSizepublic abstract int getBufferSize() Query the amount of data this stream is configured to buffer before an automatic write happens.- Returns:
- int
 
 - 
setBufferSizepublic 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:
- java.lang.IllegalStateException- if already writing data or closed
 
 - 
clearpublic abstract void clear() Clear any current buffer content in the stream.
 - 
getBytesWrittenpublic abstract long getBytesWritten() Query the amount of bytes written so far.- Returns:
- long
 
 - 
getBufferedCountpublic abstract long getBufferedCount() Query the amount of bytes currently buffered so far.- Returns:
- long
 
 - 
hasBufferedContentpublic abstract boolean hasBufferedContent() Test whether this stream has any current data buffered, waiting to be written out.- Returns:
- boolean
 
 - 
writeFilepublic abstract void writeFile(java.nio.channels.FileChannel fc) throws java.io.IOExceptionWrite a file channel onto the output stream.- Parameters:
- fc-
- Throws:
- java.io.IOException
 
 - 
flushHeaderspublic abstract void flushHeaders() throws java.io.IOExceptionWrite the current set of response headers. If the headers have already been sent, this is a no-op.- Throws:
- java.io.IOException
 
 - 
flushBufferspublic abstract void flushBuffers() throws java.io.IOExceptionFlush the output array of buffers to the network below.- Throws:
- java.io.IOException
 
 - 
isClosedpublic abstract boolean isClosed() Query whether this stream is closed already or not.- Returns:
- boolean
 
 - 
flushpublic abstract void flush(boolean ignoreFlag) throws java.io.IOException- Parameters:
- ignoreFlag-
- Throws:
- java.io.IOException
 
 - 
setContentLengthpublic abstract void setContentLength(long length) - Parameters:
- length-
 
 
- 
 
-