- public class ProHTTPCompressOutputStream
- extends java.io.OutputStream
Encapsulates the connection between the Proxy server and the Webserver.
Writes to webserver. Checks for the Accept-Encoding header. If a compression method can
be supported, adds support. If no Accept-Encoding header was found, adds one before
headers are over.
You are free to use this code and to make modifications provided
this notice is retained.
If you found this useful, please add a note of acknowledgement to my
If you would like to report a bug or suggest some improvements,
you are most welcome. I will be happy to help you use this piece of code.
- 1.00, 10th Mar, 2000
- Tanmay K. Mohapatra
Write to the underlying stream and keep appending to the string buffer.
|Methods inherited from class java.io.OutputStream
close, flush, write, write
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ProHTTPCompressOutputStream(java.io.OutputStream BaseStreamIn,
public void write(int iData)
- Write to the underlying stream and keep appending to the string buffer.
Once a new-line is received, check if the header is a Accept-Encoding header, add
some extra support if possible, set flag in ComprStatus to ignore further monitoring.
If headers ended without Accept-Encoding flag, add full support and set flag in
write in class