Java Doc for InternalOutputBuffer.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » coyote » http11 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.coyote.http11 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.coyote.http11.InternalOutputBuffer

InternalOutputBuffer
public class InternalOutputBuffer implements OutputBuffer,ByteChunk.ByteOutputChannel(Code)
Output buffer.
author:
   Remy Maucherat

Inner Class :protected class OutputStreamOutputBuffer implements OutputBuffer

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  booleancommitted
     Committed flag.
protected  OutputFilter[]filterLibrary
     Filter library.
protected  booleanfinished
     Finished flag.
protected  MimeHeadersheaders
     Headers of the associated request.
protected  intlastActiveFilter
     Index of the last active filter.
protected  OutputStreamoutputStream
     Underlying output stream.
protected  OutputBufferoutputStreamOutputBuffer
     Underlying output buffer.
protected  intpos
     Position in the buffer.
protected  Responseresponse
     Associated Coyote response.
protected static  StringManagersm
     The string manager for this package.
protected  ByteChunksocketBuffer
     Socket buffer.
protected  booleanuseSocketBuffer
     Socket buffer (extra buffering to reduce number of packets sent).

Constructor Summary
public  InternalOutputBuffer(Response response)
     Default constructor.
public  InternalOutputBuffer(Response response, int headerBufferSize)
     Alternate constructor.

Method Summary
public  voidaddActiveFilter(OutputFilter filter)
     Add an output filter to the filter library.
public  voidaddFilter(OutputFilter filter)
     Add an output filter to the filter library.
public  voidclearFilters()
     Clear filters.
protected  voidcommit()
     Commit the response.
public  intdoWrite(ByteChunk chunk, Response res)
     Write the contents of a byte chunk.
public  voidendHeaders()
     End the header block.
public  voidendRequest()
     End request.
public  voidflush()
     Flush the response.
public  OutputFilter[]getFilters()
     Get filters.
public  OutputStreamgetOutputStream()
     Get the underlying socket output stream.
public  voidnextRequest()
     End processing of current HTTP request. Note: All bytes of the current request should have been already consumed.
public  voidrealWriteBytes(byte cbuf, int off, int len)
     Callback to write data from the buffer.
public  voidrecycle()
     Recycle the output buffer.
public  voidreset()
     Reset current response.
public  voidsendAck()
     Send an acknoledgement.
public  voidsendHeader(MessageBytes name, MessageBytes value)
     Send a header.
public  voidsendHeader(ByteChunk name, ByteChunk value)
     Send a header.
public  voidsendHeader(String name, String value)
     Send a header.
public  voidsendStatus()
     Send the response status line.
public  voidsetOutputStream(OutputStream outputStream)
     Set the underlying socket output stream.
public  voidsetSocketBuffer(int socketBufferSize)
     Set the socket buffer size.
protected  voidwrite(MessageBytes mb)
     This method will write the contents of the specyfied message bytes buffer to the output stream, without filtering.
protected  voidwrite(ByteChunk bc)
     This method will write the contents of the specyfied message bytes buffer to the output stream, without filtering.
protected  voidwrite(CharChunk cc)
     This method will write the contents of the specyfied char buffer to the output stream, without filtering.
public  voidwrite(byte[] b)
     This method will write the contents of the specyfied byte buffer to the output stream, without filtering.
protected  voidwrite(String s)
     This method will write the contents of the specyfied String to the output stream, without filtering.
protected  voidwrite(int i)
     This method will print the specified integer to the output stream, without filtering.

Field Detail
activeFilters
protected OutputFilter[] activeFilters(Code)
Active filter (which is actually the top of the pipeline).



buf
protected byte[] buf(Code)
The buffer used for header composition.



committed
protected boolean committed(Code)
Committed flag.



filterLibrary
protected OutputFilter[] filterLibrary(Code)
Filter library. Note: Filter[0] is always the "chunked" filter.



finished
protected boolean finished(Code)
Finished flag.



headers
protected MimeHeaders headers(Code)
Headers of the associated request.



lastActiveFilter
protected int lastActiveFilter(Code)
Index of the last active filter.



outputStream
protected OutputStream outputStream(Code)
Underlying output stream.



outputStreamOutputBuffer
protected OutputBuffer outputStreamOutputBuffer(Code)
Underlying output buffer.



pos
protected int pos(Code)
Position in the buffer.



response
protected Response response(Code)
Associated Coyote response.



sm
protected static StringManager sm(Code)
The string manager for this package.



socketBuffer
protected ByteChunk socketBuffer(Code)
Socket buffer.



useSocketBuffer
protected boolean useSocketBuffer(Code)
Socket buffer (extra buffering to reduce number of packets sent).




Constructor Detail
InternalOutputBuffer
public InternalOutputBuffer(Response response)(Code)
Default constructor.



InternalOutputBuffer
public InternalOutputBuffer(Response response, int headerBufferSize)(Code)
Alternate constructor.




Method Detail
addActiveFilter
public void addActiveFilter(OutputFilter filter)(Code)
Add an output filter to the filter library.



addFilter
public void addFilter(OutputFilter filter)(Code)
Add an output filter to the filter library.



clearFilters
public void clearFilters()(Code)
Clear filters.



commit
protected void commit() throws IOException(Code)
Commit the response.
throws:
  IOException - an undelying I/O error occured



doWrite
public int doWrite(ByteChunk chunk, Response res) throws IOException(Code)
Write the contents of a byte chunk.
Parameters:
  chunk - byte chunk number of bytes written
throws:
  IOException - an undelying I/O error occured



endHeaders
public void endHeaders()(Code)
End the header block.



endRequest
public void endRequest() throws IOException(Code)
End request.
throws:
  IOException - an undelying I/O error occured



flush
public void flush() throws IOException(Code)
Flush the response.
throws:
  IOException - an undelying I/O error occured



getFilters
public OutputFilter[] getFilters()(Code)
Get filters.



getOutputStream
public OutputStream getOutputStream()(Code)
Get the underlying socket output stream.



nextRequest
public void nextRequest()(Code)
End processing of current HTTP request. Note: All bytes of the current request should have been already consumed. This method only resets all the pointers so that we are ready to parse the next HTTP request.



realWriteBytes
public void realWriteBytes(byte cbuf, int off, int len) throws IOException(Code)
Callback to write data from the buffer.



recycle
public void recycle()(Code)
Recycle the output buffer. This should be called when closing the connection.



reset
public void reset()(Code)
Reset current response.
throws:
  IllegalStateException - if the response has already been committed



sendAck
public void sendAck() throws IOException(Code)
Send an acknoledgement.



sendHeader
public void sendHeader(MessageBytes name, MessageBytes value)(Code)
Send a header.
Parameters:
  name - Header name
Parameters:
  value - Header value



sendHeader
public void sendHeader(ByteChunk name, ByteChunk value)(Code)
Send a header.
Parameters:
  name - Header name
Parameters:
  value - Header value



sendHeader
public void sendHeader(String name, String value)(Code)
Send a header.
Parameters:
  name - Header name
Parameters:
  value - Header value



sendStatus
public void sendStatus()(Code)
Send the response status line.



setOutputStream
public void setOutputStream(OutputStream outputStream)(Code)
Set the underlying socket output stream.



setSocketBuffer
public void setSocketBuffer(int socketBufferSize)(Code)
Set the socket buffer size.



write
protected void write(MessageBytes mb)(Code)
This method will write the contents of the specyfied message bytes buffer to the output stream, without filtering. This method is meant to be used to write the response header.
Parameters:
  mb - data to be written



write
protected void write(ByteChunk bc)(Code)
This method will write the contents of the specyfied message bytes buffer to the output stream, without filtering. This method is meant to be used to write the response header.
Parameters:
  bc - data to be written



write
protected void write(CharChunk cc)(Code)
This method will write the contents of the specyfied char buffer to the output stream, without filtering. This method is meant to be used to write the response header.
Parameters:
  cc - data to be written



write
public void write(byte[] b)(Code)
This method will write the contents of the specyfied byte buffer to the output stream, without filtering. This method is meant to be used to write the response header.
Parameters:
  b - data to be written



write
protected void write(String s)(Code)
This method will write the contents of the specyfied String to the output stream, without filtering. This method is meant to be used to write the response header.
Parameters:
  s - data to be written



write
protected void write(int i)(Code)
This method will print the specified integer to the output stream, without filtering. This method is meant to be used to write the response header.
Parameters:
  i - data to be written



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.