public class MimeTypeFile extends Object
| Constructor and Description |
|---|
MimeTypeFile()
Creates an empty DB.
|
MimeTypeFile(InputStream is) |
MimeTypeFile(String new_fname)
The construtor that takes a filename as an argument.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendToRegistry(String mime_types)
Appends string of entries to the types registry, must be valid
.mime.types format.
|
MimeTypeEntry |
getMimeTypeEntry(String file_ext)
get the MimeTypeEntry based on the file extension
|
String |
getMIMETypeString(String file_ext)
Get the MIME type string corresponding to the file extension.
|
public MimeTypeFile(String new_fname) throws IOException
new_fname - The file name of the mime types file.IOExceptionpublic MimeTypeFile(InputStream is) throws IOException
IOExceptionpublic MimeTypeFile()
public MimeTypeEntry getMimeTypeEntry(String file_ext)
public String getMIMETypeString(String file_ext)
public void appendToRegistry(String mime_types)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.