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.IOException
- for I/O errorspublic MimeTypeFile(InputStream is) throws IOException
IOException
public MimeTypeFile()
public MimeTypeEntry getMimeTypeEntry(String file_ext)
file_ext
- the file extensionpublic String getMIMETypeString(String file_ext)
file_ext
- the file extensionpublic void appendToRegistry(String mime_types)
mime_types
- the mime.types stringCopyright © 2020 JBoss by Red Hat. All rights reserved.