Class HTTPUtils

java.lang.Object
com.biglybt.core.util.HTTPUtils

public class HTTPUtils extends Object
  • Field Details

  • Constructor Details

    • HTTPUtils

      public HTTPUtils()
  • Method Details

    • guessContentTypeFromFileType

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

      public static boolean isImageFileType(String file_type)
    • 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