Name
FileNameMap
Synopsis
This interface defines a single
method that is called to obtain the MIME type of a file based on the name of
the file. The fileNameMap
field of the
URLConnection
class refers to an object that
implements this interface. The filename-to-file-type map it
implements is used by the static
URLConnection.guessContentTypeFromName( )
method.
public interface FileNameMap { // Public Instance Methods String getContentTypeFor(String fileName); }
Passed To
URLConnection.setFileNameMap( )
Returned By
URLConnection.getFileNameMap( )
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.