|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.MIME.ExhibitMIME.ExhibitTypeParameters
public static final class ExhibitMIME.ExhibitTypeParameters
JavaBean outlining file details of one Gallery exhibit item type. This object is immutable.
Not designed to be persisted, so not Serializable.
Note that this has no public no-arg constructor because these objects are all created statically and we create all the instances that should be created.
Note that this class is based on the assumption that we recognise exactly one filename suffix for each type of file archived in the Gallery, and when generating something of that type (usually) use one, different, suffix. Both suffixes are chose to be generally acceptable to most tools such as browsers.
These suffixes presented are intern()ed so that the number of copies of them kicking around can be reduced. Don't go casually making up lots of random file-types...
| Field Summary | |
|---|---|
java.util.Set<java.lang.String> |
allMagics
All legitimate `magic number' values for this type; never null. |
java.util.Set<java.lang.String> |
allSuffixesForFile
All (dotless, lower-case) suffixes for this type, including the primary suffix; never null nor empty. |
java.lang.String |
description
Textual (English) description of the file type. |
java.lang.String |
dotSuffixForInputFile
Suffix of input file including leading dot; lower-case, never null. |
Handler |
handler
Instance of handler class, or null if none. |
java.lang.String |
handlerClassName
Fully-qualified name of handler class (implementing HandlerBase), or null if none. |
java.lang.String |
magic
This is the primary `magic number' at the start of the file; never null though may be "". |
java.lang.String |
mimeType
The canonical MIME type for this exhibit format; never null nor "". |
java.lang.String |
suffixForInputFile
Suffix of file if this item is an exhibit in the Gallery; lower-case, never null. |
int |
type
ET_XXX type of file. |
| Constructor Summary | |
|---|---|
private |
ExhibitMIME.ExhibitTypeParameters(int _type,
java.lang.String _suffixForInputFile,
java.lang.String[] _allSuffixes,
java.lang.String _mimeType,
java.lang.String _handlerClassName,
java.lang.String _magic,
java.lang.String[] _allMagics,
java.lang.String _description)
Make a new MIME type descriptor. |
private |
ExhibitMIME.ExhibitTypeParameters(int _type,
java.lang.String _suffixForInputFile,
java.lang.String _mimeType,
java.lang.String _handlerClassName,
java.lang.String _magic,
java.lang.String _description)
Make a new MIME type descriptor. |
| Method Summary | |
|---|---|
boolean |
canPossiblyCreateThumbnailOfSameMIMEType()
Returns true if we may be able to create a thumbnail/sample with the same MIME type as this. |
int |
compareTo(ExhibitMIME.ExhibitTypeParameters o)
Sort by type. |
boolean |
equals(java.lang.Object o)
Equal if type is equal. |
int |
hashCode()
Tested for equality and sorted on type. |
java.lang.String |
toString()
Make meaningful human-readable diagnostic String representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final int type
public final java.lang.String suffixForInputFile
This does not include the dot that comes before the extension.
This value is never null or zero-length, and is intern()ed.
public final java.lang.String dotSuffixForInputFile
public final java.util.Set<java.lang.String> allSuffixesForFile
No entries are null or "" or start with (or contain) a dot.
This is immutable.
public final java.lang.String magic
This enables a simple form of file-type checking like the UNIX ``file'' utility.
This string may be zero-length, but it is never null.
public final java.util.Set<java.lang.String> allMagics
No entries are null or "".
Is empty if no magic number.
This is immutable.
public final java.lang.String mimeType
public final java.lang.String handlerClassName
public final Handler handler
public final java.lang.String description
This is intended to be terse enough to go on a Web page with an image file if need be. It may be zero length, though must not be null.
| Constructor Detail |
|---|
private ExhibitMIME.ExhibitTypeParameters(int _type,
java.lang.String _suffixForInputFile,
java.lang.String _mimeType,
java.lang.String _handlerClassName,
java.lang.String _magic,
java.lang.String _description)
_handlerClassName - the fully-qualified class name
of the handler for this MIME type; if null a default
of DEFAULT_HANDLER_PACKAGE package with the class name
the same as the primary (all-lower-case) suffix
is used instead
private ExhibitMIME.ExhibitTypeParameters(int _type,
java.lang.String _suffixForInputFile,
java.lang.String[] _allSuffixes,
java.lang.String _mimeType,
java.lang.String _handlerClassName,
java.lang.String _magic,
java.lang.String[] _allMagics,
java.lang.String _description)
_allSuffixes - null or a set of (dotless) extensions
(possibly including the primary one)
by which we may recognise input files of this type_allMagics - null or a set of magic numbers/strings
(possibly including the primary one if not "")
by which we may recognise input files of this type_handlerClassName - the fully-qualified class name
of the handler for this MIME type; if null a default
of DEFAULT_HANDLER_PACKAGE package with the class name
the same as the primary (all-lower-case) suffix
is used instead| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int compareTo(ExhibitMIME.ExhibitTypeParameters o)
compareTo in interface java.lang.Comparable<ExhibitMIME.ExhibitTypeParameters>public boolean canPossiblyCreateThumbnailOfSameMIMEType()
|
DHD Multimedia Gallery V1.60.69 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||