|
Apache Tomcat 7.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.coyote.http11.AbstractOutputBuffer
public abstract class AbstractOutputBuffer
Field Summary | |
---|---|
protected OutputFilter[] |
activeFilters
Active filter (which is actually the top of the pipeline). |
protected byte[] |
buf
The buffer used for header composition. |
protected boolean |
committed
Committed flag. |
protected OutputFilter[] |
filterLibrary
Filter library. |
protected boolean |
finished
Finished flag. |
protected MimeHeaders |
headers
Headers of the associated request. |
protected int |
lastActiveFilter
Index of the last active filter. |
protected OutputBuffer |
outputStreamOutputBuffer
Underlying output buffer. |
protected int |
pos
Position in the buffer. |
protected Response |
response
Associated Coyote response. |
protected static StringManager |
sm
The string manager for this package. |
Constructor Summary | |
---|---|
AbstractOutputBuffer()
|
Method Summary | |
---|---|
void |
addActiveFilter(OutputFilter filter)
Add an output filter to the filter library. |
void |
addFilter(OutputFilter filter)
Add an output filter to the filter library. |
void |
clearFilters()
Clear filters. |
protected abstract void |
commit()
|
int |
doWrite(ByteChunk chunk,
Response res)
Write the contents of a byte chunk. |
void |
endHeaders()
End the header block. |
void |
endRequest()
End request. |
void |
flush()
Flush the response. |
OutputFilter[] |
getFilters()
Get filters. |
void |
nextRequest()
End processing of current HTTP request. |
void |
recycle()
Recycle the output buffer. |
void |
reset()
Reset current response. |
abstract void |
sendAck()
|
void |
sendHeader(ByteChunk name,
ByteChunk value)
Send a header. |
void |
sendHeader(MessageBytes name,
MessageBytes value)
Send a header. |
void |
sendHeader(String name,
String value)
Send a header. |
void |
sendStatus()
Send the response status line. |
void |
write(byte[] b)
This method will write the contents of the specified byte buffer to the output stream, without filtering. |
protected void |
write(ByteChunk bc)
This method will write the contents of the specified message bytes buffer to the output stream, without filtering. |
protected void |
write(CharChunk cc)
This method will write the contents of the specified char buffer to the output stream, without filtering. |
protected void |
write(int i)
This method will print the specified integer to the output stream, without filtering. |
protected void |
write(MessageBytes mb)
This method will write the contents of the specified message bytes buffer to the output stream, without filtering. |
protected void |
write(String s)
This method will write the contents of the specified String to the output stream, without filtering. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Response response
protected MimeHeaders headers
protected boolean committed
protected boolean finished
protected byte[] buf
protected int pos
protected OutputFilter[] filterLibrary
protected OutputFilter[] activeFilters
protected int lastActiveFilter
protected OutputBuffer outputStreamOutputBuffer
protected static final StringManager sm
Constructor Detail |
---|
public AbstractOutputBuffer()
Method Detail |
---|
public void addFilter(OutputFilter filter)
public OutputFilter[] getFilters()
public void clearFilters()
public void addActiveFilter(OutputFilter filter)
public int doWrite(ByteChunk chunk, Response res) throws IOException
doWrite
in interface OutputBuffer
chunk
- byte chunkres
- used to allow buffers that can be shared by multiple responses.
IOException
- an underlying I/O error occurredpublic void flush() throws IOException
IOException
- an underlying I/O error occurredpublic void reset()
IllegalStateException
- if the response has already been committedpublic void recycle()
public void nextRequest()
public void endRequest() throws IOException
IOException
- an underlying I/O error occurredpublic abstract void sendAck() throws IOException
IOException
protected abstract void commit() throws IOException
IOException
public void sendStatus()
public void sendHeader(MessageBytes name, MessageBytes value)
name
- Header namevalue
- Header valuepublic void sendHeader(ByteChunk name, ByteChunk value)
name
- Header namevalue
- Header valuepublic void sendHeader(String name, String value)
name
- Header namevalue
- Header valuepublic void endHeaders()
protected void write(MessageBytes mb)
mb
- data to be writtenprotected void write(ByteChunk bc)
bc
- data to be writtenprotected void write(CharChunk cc)
cc
- data to be writtenpublic void write(byte[] b)
b
- data to be writtenprotected void write(String s)
s
- data to be writtenprotected void write(int i)
i
- data to be written
|
Apache Tomcat 7.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |