com.aelitis.azureus.core.util
Class HTTPUtils

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

public class HTTPUtils
extends Object


Field Summary
static String NL
           
 
Constructor Summary
HTTPUtils()
           
 
Method Summary
static boolean canGZIP(String accept_encoding)
           
static InputStream decodeChunkedEncoding(Socket socket)
           
static InputStream decodeChunkedEncoding(Socket socket, boolean ignoreStatusCode)
           
static String guessContentTypeFromFileType(String file_type)
           
static boolean useCompressionForFileType(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 String NL
See Also:
Constant Field Values
Constructor Detail

HTTPUtils

public HTTPUtils()
Method Detail

guessContentTypeFromFileType

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

canGZIP

public static boolean canGZIP(String accept_encoding)

useCompressionForFileType

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

decodeChunkedEncoding

public static InputStream decodeChunkedEncoding(Socket socket)
                                         throws IOException
Throws:
IOException

decodeChunkedEncoding

public static InputStream decodeChunkedEncoding(Socket socket,
                                                boolean ignoreStatusCode)
                                         throws IOException
Throws:
IOException