| java.lang.Object com.sun.perseus.platform.GZIPSupport
GZIPSupport | public class GZIPSupport (Code) | | This class is used to provide GZIP support to the Perseus engine by using
a custom implementation of GZIPInputStream
com.sun.perseus.platform.GZIPInputStream
|
Method Summary | |
public static InputStream | handleGZIP(InputStream is) This method checks if the input stream is a GZIP stream.
It reads the first two bytes of the stream and compares
the short it reads with the GZIP magic number
(see java.util.zip.GZIPInputStream.GZIP_MAGIC).
If the magic number matches, the method returns a
java.util.zip.GZIPInputStream which wraps the
input stream. | public static InputStream | openHandleGZIP(String svgURI) If GZIP encoding is supported, this method should setup the
HTTP Request Header to declare that GZIP encoding is supported.
Parameters: svgURI - the url of the requested SVG resource. | static void | setupHttpEncoding(HttpConnection httpC) |
HTTP_ACCEPT_ENCODING | final public static String HTTP_ACCEPT_ENCODING(Code) | | Used for HTTP request headers
|
HTTP_GZIP_ENCODING | final static String HTTP_GZIP_ENCODING(Code) | | GZIP encoding
|
handleGZIP | public static InputStream handleGZIP(InputStream is) throws IOException(Code) | | This method checks if the input stream is a GZIP stream.
It reads the first two bytes of the stream and compares
the short it reads with the GZIP magic number
(see java.util.zip.GZIPInputStream.GZIP_MAGIC).
If the magic number matches, the method returns a
java.util.zip.GZIPInputStream which wraps the
input stream. Otherwise, the method returns either the
unchanged stream or a BufferedInputStream
if the input stream did not support marking, as defined
by the java.io.InputStream.mark method.
Parameters: is - the input stream that might be GZIPPed. a stream that handles GZIP uncompression, if any is needed. throws: IOException - if an I/O error happens while buildinga GZIPInputStream. |
openHandleGZIP | public static InputStream openHandleGZIP(String svgURI) throws IOException(Code) | | If GZIP encoding is supported, this method should setup the
HTTP Request Header to declare that GZIP encoding is supported.
Parameters: svgURI - the url of the requested SVG resource. a stream that does not handles GZIP uncompression. throws: IOException - if an I/O error happens while opening the requested URI. |
|
|