|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream javax.servlet.ServletOutputStream org.apache.catalina.connector.ResponseStream
Convenience implementation of ServletOutputStream that works with the standard ResponseBase implementation of Response. If the content length has been set on our associated Response, this implementation will enforce not writing more than that many bytes on the underlying stream.
Field Summary | |
protected boolean |
closed
Deprecated. Has this stream been closed? |
protected boolean |
commit
Deprecated. Should we commit the response when we are flushed? |
protected int |
count
Deprecated. The number of bytes which have already been written to this stream. |
protected int |
length
Deprecated. The content length past which we will not write, or -1 if there is no defined content length. |
protected Response |
response
Deprecated. The Response with which this input stream is associated. |
protected static StringManager |
sm
Deprecated. The localized strings for this package. |
protected java.io.OutputStream |
stream
Deprecated. The underlying output stream to which we should write data. |
protected boolean |
suspended
Deprecated. Has this response output been suspended? |
Constructor Summary | |
ResponseStream(Response response)
Deprecated. Construct a servlet output stream associated with the specified Request. |
Method Summary | |
void |
close()
Deprecated. Close this output stream, causing any buffered data to be flushed and any further output data to throw an IOException. |
void |
flush()
Deprecated. Flush any buffered data for this output stream, which also causes the response to be committed. |
void |
write(byte[] b)
Deprecated. Write b.length bytes from the specified byte array
to our output stream. |
void |
write(byte[] b,
int off,
int len)
Deprecated. Write len bytes from the specified byte array, starting
at the specified offset, to our output stream. |
void |
write(int b)
Deprecated. 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 |
Field Detail |
protected boolean closed
protected boolean commit
protected int count
protected int length
protected Response response
protected static StringManager sm
protected java.io.OutputStream stream
protected boolean suspended
Constructor Detail |
public ResponseStream(Response response)
response
- The associated responseMethod Detail |
public void close() throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
public void write(int b) throws java.io.IOException
b
- The byte to be written
java.io.IOException
- if an input/output error occurspublic void write(byte[] b) throws java.io.IOException
b.length
bytes from the specified byte array
to our output stream.
b
- The byte array to be written
java.io.IOException
- if an input/output error occurspublic void write(byte[] b, int off, int len) throws java.io.IOException
len
bytes from the specified byte array, starting
at the specified offset, to our output stream.
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
java.io.IOException
- if an input/output error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |