Package com.biglybt.core.util
Class HTTPUtils
java.lang.Object
com.biglybt.core.util.HTTPUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static InputStream
decodeChunkedEncoding
(Socket socket) static InputStream
decodeChunkedEncoding
(Socket socket, boolean ignoreStatusCode) static String
guessContentTypeFromFileType
(String file_type) static boolean
isImageFileType
(String file_type) static boolean
useCompressionForFileType
(String file_type)
-
Field Details
-
NL
- See Also:
-
default_type
- See Also:
-
file_types
-
compression
-
-
Constructor Details
-
HTTPUtils
public HTTPUtils()
-
-
Method Details
-
guessContentTypeFromFileType
- Parameters:
file_type
- file extension- Returns:
- appropriate content type string if found
-
isImageFileType
-
canGZIP
-
useCompressionForFileType
- Parameters:
file_type
- a file type like text/plain- Returns:
- true if the file_type should be compressed
-
decodeChunkedEncoding
- Throws:
IOException
-
decodeChunkedEncoding
public static InputStream decodeChunkedEncoding(Socket socket, boolean ignoreStatusCode) throws IOException - Throws:
IOException
-