org.apache.catalina.connector.http
Class HttpResponseStream
java.lang.Object
|
+--java.io.OutputStream
|
+--javax.servlet.ServletOutputStream
|
+--org.apache.catalina.connector.ResponseStream
|
+--org.apache.catalina.connector.http.HttpResponseStream
- public final class HttpResponseStream
- extends ResponseStream
Response stream for the HTTP/1.1 connector. This stream will automatically
chunk the answer if using HTTP/1.1 and no Content-Length has been properly
set.
- Author:
- Remy Maucherat
Constructor Summary |
HttpResponseStream(org.apache.catalina.connector.http.HttpResponseImpl response)
Construct a servlet output stream associated with the specified Request. |
Method Summary |
protected void |
checkHead(org.apache.catalina.connector.http.HttpResponseImpl response)
|
void |
close()
Close this output stream, causing any buffered data to be flushed and
any further output data to throw an IOException. |
void |
write(byte[] b,
int off,
int len)
Write the specified byte array. |
void |
write(int b)
Write the specified byte to our output stream. |
Methods inherited from class javax.servlet.ServletOutputStream |
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpResponseStream
public HttpResponseStream(org.apache.catalina.connector.http.HttpResponseImpl response)
- Construct a servlet output stream associated with the specified Request.
- Parameters:
response
- The associated response
write
public void write(int b)
throws java.io.IOException
- Write the specified byte to our output stream.
- Overrides:
write
in class ResponseStream
- Parameters:
b
- The byte to be written
- Throws:
java.io.IOException
- if an input/output error occurs
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Write the specified byte array.
- Overrides:
write
in class ResponseStream
- Parameters:
b
- The byte array containing the bytes to be writtenoff
- Zero-relative starting offset of the bytes to be writtenlen
- The number of bytes to be written
- Throws:
java.io.IOException
- if an input/output error occurs
close
public void close()
throws java.io.IOException
- Close this output stream, causing any buffered data to be flushed and
any further output data to throw an IOException.
- Overrides:
close
in class ResponseStream
java.io.IOException
checkHead
protected void checkHead(org.apache.catalina.connector.http.HttpResponseImpl response)
Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.