com.aelitis.azureus.core.util
Class HTTPUtils
java.lang.Object
com.aelitis.azureus.core.util.HTTPUtils
public class HTTPUtils
- extends java.lang.Object
Field Summary |
static java.lang.String |
NL
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NL
public static final java.lang.String NL
- See Also:
- Constant Field Values
HTTPUtils
public HTTPUtils()
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