|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImageFactory
This interface is used for classes which can produce instances of Image implementors.
Note that this interface forms the contract between the FactoryRegistry
and an implementation. The methods on this interface are only intended to be called by the FactoryRegistry
Field Summary | |
---|---|
static int |
MAJOR_VERSION
The major version number of the current API. |
static int |
MINOR_VERSION
The minor version number of the current API = ImageFactory.MINOR_VERSION) |
Method Summary | |
---|---|
Image |
getImage(java.io.File imageFile)
Creates a new Image object based on the contents of imageFile. |
Image |
getImage(java.io.File imageFile,
java.io.File metadata)
Creates a new Image object based on the contents of imageFile and metadata |
JavaRuntime |
getJavaRuntime(java.io.File file)
Creates a new JavaRuntime object based on the contents of the file; |
int |
getMajorVersion()
Fetch the major version number |
int |
getMinorVersion()
Fetch the minor version number |
int |
getModificationLevel()
Fetch the modification level |
java.lang.String[] |
getValidFileExtensions()
Returns an array of file extensions that the FactoryRegistry can use
to determine if an file can be processed by this Image Factory implementation. |
Field Detail |
---|
static final int MAJOR_VERSION
The major version number of the current API.
Note that this value will be inlined so users can reference it directly (ie: factory.getMajorVersion() >= ImageFactory.MAJOR_VERSION)
static final int MINOR_VERSION
The minor version number of the current API
= ImageFactory.MINOR_VERSION)
Method Detail |
---|
Image getImage(java.io.File imageFile) throws java.io.IOException
Creates a new Image object based on the contents of imageFile.
Note that this method is only intended to be called by the FactoryRegistry
imageFile
- a file with Image information, typically a core file
java.io.IOException
- if unable to create an image from the provided fileImage getImage(java.io.File imageFile, java.io.File metadata) throws java.io.IOException
Creates a new Image object based on the contents of imageFile and metadata
Note that this method is only intended to be called by the FactoryRegistry
imageFile
- a file with Image information, typically a core filemetadata
- a file with additional Image information. This is an implementation defined file
java.io.IOException
- if unable to create an image from the provided fileint getMajorVersion()
Fetch the major version number
int getMinorVersion()
Fetch the minor version number
int getModificationLevel()
Fetch the modification level
java.lang.String[] getValidFileExtensions()
Returns an array of file extensions that the FactoryRegistry
can use
to determine if an file can be processed by this Image Factory implementation.
File extensions are the part of a file name after the last '.'.
The returned array is treated as a case insensitive collection of file extensions.
The returned array is expected to contain at least one entry.
Note that this method is only intended to be called by the FactoryRegistry
JavaRuntime getJavaRuntime(java.io.File file) throws java.io.IOException
Creates a new JavaRuntime object based on the contents of the file;
Note that this method is only intended to be called by the FactoryRegistry
file
- a file with JavaRuntime information
java.io.IOException
- if unable to create a runtime from the provided file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |