# FileNameMap

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# FileNameMap

`
public


interface
FileNameMap
`  
`


`

|----------------------|
| java.net.FileNameMap |

<br />

*** ** * ** ***

A simple interface which provides a mechanism to map between a file name and a MIME type string.

## Summary

|                                                                                                                                                             ### Public methods                                                                                                                                                             ||
|--------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[String](https://developer.android.com/reference/java/lang/String) | ` `[getContentTypeFor](https://developer.android.com/reference/java/net/FileNameMap#getContentTypeFor(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` fileName) ` Gets the MIME type for the specified file name. |

## Public methods

### getContentTypeFor

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract String getContentTypeFor (String fileName)
```

Gets the MIME type for the specified file name.

<br />

|                      Parameters                      ||
|------------|------------------------------------------|
| `fileName` | `String`: the specified file name <br /> |

|                                                                  Returns                                                                  ||
|--------------------------------------------------------------------|-----------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | a`String`indicating the MIME type for the specified file name. <br /> |