|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.MediaType
A generic type of media, i.e., "video" or "audio". Many different file formats can be of the same media type. MediaType's are immutable. Serializable for downloads.dat file; be careful when modifying!
Constructor Summary | |
MediaType(java.lang.String schema,
java.lang.String description,
java.lang.String[] extensions)
|
Method Summary | |
static MediaType |
getAudioMediaType()
|
static MediaType[] |
getDefaultMediaTypes()
|
java.lang.String |
getDescription()
Returns this' description key in localizable resources (now distinct from the result of the toString method) |
static MediaType |
getImageMediaType()
|
static MediaType |
getVideoMediaType()
|
static boolean |
isDefaultType(java.lang.String schema)
|
boolean |
matches(java.lang.String filename)
Returns true if a file with the given name is of this media type, i.e., the suffix of the filename matches one of this' extensions. |
java.lang.String |
toString()
Returns this' media-type (a MIME content-type category) (previously returned a description key) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MediaType(java.lang.String schema, java.lang.String description, java.lang.String[] extensions)
schema
- a MIME compliant non-localizable identifier,
that matches file categories (and XSD schema names).extensions
- a list of all file extensions of this
type. Must be all lowercase. If null, this matches
any file.Method Detail |
public boolean matches(java.lang.String filename)
public java.lang.String toString()
public java.lang.String getDescription()
public static final MediaType[] getDefaultMediaTypes()
public static boolean isDefaultType(java.lang.String schema)
public static MediaType getAudioMediaType()
public static MediaType getVideoMediaType()
public static MediaType getImageMediaType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |