ProProxy Home

Class ProHTTPCompressOutputStream


public class ProHTTPCompressOutputStream

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 guestbook. 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

Constructor Summary
ProHTTPCompressOutputStream( BaseStreamIn, ProHTTPCompressStatus ComprStatusIn)
Method Summary
 void write(int iData)
          Write to the underlying stream and keep appending to the string buffer.
Methods inherited from class
close, flush, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ProHTTPCompressOutputStream( BaseStreamIn,
                                   ProHTTPCompressStatus ComprStatusIn)
Method Detail


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 ComprStatus.
write in class

ProProxy Home