ProProxy Home

proproxy
Class ProHTTPCompressOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--proproxy.ProHTTPCompressOutputStream

public class ProHTTPCompressOutputStream
extends java.io.OutputStream

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.

Version:
1.00, 10th Mar, 2000
Author:
Tanmay K. Mohapatra

Constructor Summary
ProHTTPCompressOutputStream(java.io.OutputStream 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 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
 

Constructor Detail

ProHTTPCompressOutputStream

public ProHTTPCompressOutputStream(java.io.OutputStream BaseStreamIn,
                                   ProHTTPCompressStatus ComprStatusIn)
Method Detail

write

public void write(int iData)
           throws java.io.IOException
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.
Overrides:
write in class java.io.OutputStream

ProProxy Home