com.aelitis.azureus.core.util
Class HTTPUtils

java.lang.Object
  extended by com.aelitis.azureus.core.util.HTTPUtils

public class HTTPUtils
extends java.lang.Object


Field Summary
static java.lang.String NL
           
 
Constructor Summary
HTTPUtils()
           
 
Method Summary
static boolean canGZIP(java.lang.String accept_encoding)
           
static java.io.InputStream decodeChunkedEncoding(java.net.Socket socket)
           
static java.io.InputStream decodeChunkedEncoding(java.net.Socket socket, boolean ignoreStatusCode)
           
static java.lang.String guessContentTypeFromFileType(java.lang.String file_type)
           
static boolean useCompressionForFileType(java.lang.String file_type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NL

public static final java.lang.String NL
See Also:
Constant Field Values
Constructor Detail

HTTPUtils

public HTTPUtils()
Method Detail

guessContentTypeFromFileType

public static java.lang.String guessContentTypeFromFileType(java.lang.String file_type)
Parameters:
file_type - file extension
Returns:
apropriate content type string if found

canGZIP

public static boolean canGZIP(java.lang.String accept_encoding)

useCompressionForFileType

public static boolean useCompressionForFileType(java.lang.String file_type)
Parameters:
file_type - a file type like text/plain
Returns:
true if the file_type should be compressed

decodeChunkedEncoding

public static java.io.InputStream decodeChunkedEncoding(java.net.Socket socket)
                                                 throws java.io.IOException
Throws:
java.io.IOException

decodeChunkedEncoding

public static java.io.InputStream decodeChunkedEncoding(java.net.Socket socket,
                                                        boolean ignoreStatusCode)
                                                 throws java.io.IOException
Throws:
java.io.IOException