|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tika.mime.MediaTypeRegistry
public class MediaTypeRegistry
Registry of known Internet media types.
Constructor Summary | |
---|---|
MediaTypeRegistry()
|
Method Summary | |
---|---|
void |
addAlias(MediaType type,
MediaType alias)
|
void |
addSuperType(MediaType type,
MediaType supertype)
|
void |
addType(MediaType type)
|
SortedSet<MediaType> |
getAliases(MediaType type)
Returns the set of known aliases of the given canonical media type. |
static MediaTypeRegistry |
getDefaultRegistry()
Returns the built-in media type registry included in Tika. |
MediaType |
getSupertype(MediaType type)
Returns the supertype of the given type. |
SortedSet<MediaType> |
getTypes()
Returns the set of all known canonical media types. |
boolean |
isSpecializationOf(MediaType a,
MediaType b)
Checks whether the given media type a is a specialization of a more generic type b. |
MediaType |
normalize(MediaType type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MediaTypeRegistry()
Method Detail |
---|
public static MediaTypeRegistry getDefaultRegistry()
public SortedSet<MediaType> getTypes()
public SortedSet<MediaType> getAliases(MediaType type)
type
- canonical media type
public void addType(MediaType type)
public void addAlias(MediaType type, MediaType alias)
public void addSuperType(MediaType type, MediaType supertype)
public MediaType normalize(MediaType type)
public boolean isSpecializationOf(MediaType a, MediaType b)
a
- media typeb
- suspected supertype
true
if b is a supertype of a,
false
otherwisepublic MediaType getSupertype(MediaType type)
null
.
type
- media type
null
for application/octet-stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |