Package java.net

Interface FileNameMap


public interface FileNameMap
Defines a scheme for mapping a filename type to a MIME content type. Mainly used by URLStreamHandler for determining the right content handler to handle the resource.
See Also:
ContentHandler, URLConnection.getFileNameMap(), URLConnection.guessContentTypeFromName(String), URLStreamHandler
  • Method Summary

    Modifier and Type Method Description
    String getContentTypeFor​(String filename)
    Returns the MIME type (such as "text/plain") for the given filename, or null.
  • Method Details

    • getContentTypeFor

      String getContentTypeFor​(String filename)
      Returns the MIME type (such as "text/plain") for the given filename, or null.