public class MimeTypesFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CUSTOM_MIMES_SYS_PROP
System property to set a path to an additional external custom mimetypes
XML file to be loaded.
|
Constructor and Description |
---|
MimeTypesFactory() |
Modifier and Type | Method and Description |
---|---|
static MimeTypes |
create()
Creates an empty instance; same as calling new MimeTypes().
|
static MimeTypes |
create(org.w3c.dom.Document document)
Creates and returns a MimeTypes instance from the specified document.
|
static MimeTypes |
create(java.io.InputStream... inputStreams)
Creates and returns a MimeTypes instance from the specified input stream.
|
static MimeTypes |
create(java.io.InputStream stream) |
static MimeTypes |
create(java.lang.String filePath)
Creates and returns a MimeTypes instance from the specified file path,
as interpreted by the class loader in getResource().
|
static MimeTypes |
create(java.lang.String coreFilePath,
java.lang.String extensionFilePath)
Creates and returns a MimeTypes instance.
|
static MimeTypes |
create(java.lang.String coreFilePath,
java.lang.String extensionFilePath,
java.lang.ClassLoader classLoader)
Creates and returns a MimeTypes instance.
|
static MimeTypes |
create(java.net.URL... urls)
Creates and returns a MimeTypes instance from the resource
at the location specified by the URL.
|
static MimeTypes |
create(java.net.URL url) |
public static final java.lang.String CUSTOM_MIMES_SYS_PROP
public static MimeTypes create()
public static MimeTypes create(org.w3c.dom.Document document) throws MimeTypeException
MimeTypeException
- if the type configuration is invalidpublic static MimeTypes create(java.io.InputStream... inputStreams) throws java.io.IOException, MimeTypeException
java.io.IOException
- if the stream can not be readMimeTypeException
- if the type configuration is invalidpublic static MimeTypes create(java.io.InputStream stream) throws java.io.IOException, MimeTypeException
java.io.IOException
MimeTypeException
create(InputStream...)
public static MimeTypes create(java.net.URL... urls) throws java.io.IOException, MimeTypeException
java.io.IOException
- if the URL can not be accessedMimeTypeException
- if the type configuration is invalidpublic static MimeTypes create(java.net.URL url) throws java.io.IOException, MimeTypeException
java.io.IOException
MimeTypeException
create(URL...)
public static MimeTypes create(java.lang.String filePath) throws java.io.IOException, MimeTypeException
java.io.IOException
- if the file can not be accessedMimeTypeException
- if the type configuration is invalidpublic static MimeTypes create(java.lang.String coreFilePath, java.lang.String extensionFilePath) throws java.io.IOException, MimeTypeException
coreFilePath
- The main MimeTypes file to loadextensionFilePath
- The name of extension MimeType files to load afterwardsjava.io.IOException
- if the file can not be accessedMimeTypeException
- if the type configuration is invalidpublic static MimeTypes create(java.lang.String coreFilePath, java.lang.String extensionFilePath, java.lang.ClassLoader classLoader) throws java.io.IOException, MimeTypeException
CUSTOM_MIMES_SYS_PROP
, if specified.coreFilePath
- The main MimeTypes file to loadextensionFilePath
- The name of extension MimeType files to load afterwardsjava.io.IOException
- if the file can not be accessedMimeTypeException
- if the type configuration is invalidCopyright © 2010 - 2020 Adobe. All Rights Reserved