public class HttpResponseStream extends ResponseStream implements SendfileOutputStream
SIZE| Modifier and Type | Method and Description |
|---|---|
protected void |
closeNextImpl() |
void |
flushNextImpl() |
protected byte[] |
getNextBuffer() |
protected int |
getNextBufferOffset() |
protected int |
getNextStartOffset() |
boolean |
isClosed() |
boolean |
isMmapEnabled() |
boolean |
isSendfileEnabled() |
void |
sendFile(Path path,
long offset,
long length)
Sends a file.
|
protected void |
setNextBufferOffsetImpl(int offset) |
void |
start()
initializes the Response stream at the beginning of a request.
|
protected void |
writeHeaders(int length)
Writes any http headers.
|
void |
writeMmap(long mmapAddress,
long[] mmapBlocks,
long mmapOffset,
long mmapLength) |
protected byte[] |
writeNextBufferImpl(int offset) |
void |
writeSendfile(byte[] fileName,
int nameLength,
long fileLength) |
protected void |
writeTailImpl(boolean isComplete) |
canWrite, clear, clearBuffer, clearClosed, clearNext, closeImpl, closeNext, completeCache, dbgId, flush, flushByte, flushChar, flushNext, getBuffer, getBufferOffset, getByteCacheStream, getCauchoResponse, getContentLength, getResponse, hasData, isCauchoResponseStream, isCloseComplete, isCommitted, isDisableAutoFlush, isNextValid, killCaching, nextBuffer, setAutoFlush, setBufferOffset, setBufferSize, setByteCacheStream, setFlush, setNextBufferOffset, setProxyCacheResponse, setResponse, startCaching, toString, write, writeNext, writeNextBuffer, writeTailflushBuffer, flushByteBuffer, flushCharBuffer, getBufferLength, getBufferSize, getByteBufferOffset, getCharBuffer, getCharOffset, getRemaining, isCharFlushing, nextCharBuffer, print, print, setCharOffset, setEncoding, setLocale, setOutputStreamOnly, writeclose, getCharCacheStream, getEncoding, isAutoFlush, isClosing, isHead, setCauchoResponse, setCharCacheStream, setCommitted, setHead, toClosingpublic boolean isClosed()
isClosed in class AbstractResponseStreampublic void start()
start in class ResponseStreamprotected void writeHeaders(int length)
throws java.io.IOException
ToByteResponseStreamwriteHeaders in class ResponseStreamlength - the current buffer lengthjava.io.IOExceptionprotected byte[] getNextBuffer()
getNextBuffer in class ResponseStreamprotected int getNextStartOffset()
getNextStartOffset in class ResponseStreamprotected int getNextBufferOffset()
throws java.io.IOException
getNextBufferOffset in class ResponseStreamjava.io.IOExceptionprotected void setNextBufferOffsetImpl(int offset)
setNextBufferOffsetImpl in class ResponseStreamprotected byte[] writeNextBufferImpl(int offset)
throws java.io.IOException
writeNextBufferImpl in class ResponseStreamjava.io.IOExceptionpublic void flushNextImpl()
throws java.io.IOException
flushNextImpl in class ResponseStreamjava.io.IOExceptionprotected void closeNextImpl()
throws java.io.IOException
closeNextImpl in class ResponseStreamjava.io.IOExceptionprotected void writeTailImpl(boolean isComplete)
throws java.io.IOException
writeTailImpl in class ResponseStreamjava.io.IOExceptionpublic boolean isMmapEnabled()
isMmapEnabled in interface SendfileOutputStreampublic boolean isSendfileEnabled()
isSendfileEnabled in interface SendfileOutputStreampublic void sendFile(Path path, long offset, long length) throws java.io.IOException
sendFile in class AbstractResponseStreampath - the path to the filelength - the length of the file (-1 if unknown)java.io.IOExceptionpublic void writeMmap(long mmapAddress,
long[] mmapBlocks,
long mmapOffset,
long mmapLength)
throws java.io.IOException
writeMmap in interface SendfileOutputStreamjava.io.IOExceptionpublic void writeSendfile(byte[] fileName,
int nameLength,
long fileLength)
throws java.io.IOException
writeSendfile in interface SendfileOutputStreamjava.io.IOException