- public class ProHTTPCompressInputStream
- extends java.io.InputStream
Encapsulates the actual HTTP connection between the Proxy and the WebServer.
Handles header modification and compression of data transparently.
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
Wrapper read function that parses and modifies the underlying stream also.
|Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ProHTTPCompressInputStream(java.io.InputStream BaseStreamIn,
public int read()
- Wrapper read function that parses and modifies the underlying stream also.
Read from the underlying stream. Write to the StringBuffer. When a new-line is obtained,
check if the header is a Content-Encoding header. If yes, check in ComprStatus and
modify it if required. If the header is a content-length header, read the whole output
and store it in a local buffer. Henceforth, give from local buffer.
If no intervention is required, ignore all the above and return whatever the base stream
read in class