|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.abdera.util.MimeTypeHelper
public class MimeTypeHelper
Utilities for working with MIME Media Types
Constructor Summary | |
---|---|
MimeTypeHelper()
|
Method Summary | ||
---|---|---|
static int |
compare(javax.activation.MimeType mt1,
javax.activation.MimeType mt2)
Compare two media types according to their relative level of specificity |
|
static int |
compare(String t1,
String t2)
Compare two media types according to their relative level of specificity |
|
static String[] |
condense(String... types)
This will take an array of media types and will condense them based on wildcards, etc. |
|
static String |
getCharset(String mediatype)
|
|
static Comparator<String> |
getComparator()
Returns a Comparator that can be used to compare and sort MIME media types according to their level of specificity (e.g. |
|
static
|
getMimeType(T base)
Returns the appropriate media type for the given Abdera base |
|
static boolean |
isApp(String a)
Returns true if media type a matches application/atomsrv+xml |
|
static boolean |
isAtom(String a)
Returns true if media type a matches application/atom+xml |
|
static boolean |
isEntry(String a)
Returns true if media type a specifically identifies an Atom entry document |
|
static boolean |
isFeed(String a)
Returns true if media type a explicitly identifies an Atom feed document |
|
static boolean |
isMatch(javax.activation.MimeType a,
javax.activation.MimeType b)
|
|
static boolean |
isMatch(javax.activation.MimeType a,
javax.activation.MimeType b,
boolean includeparams)
Returns true if media type a matches media type b |
|
static boolean |
isMatch(String a,
String b)
Returns true if media type a matches media type b |
|
static boolean |
isMimeType(String a)
Returns true if this is a valid media type |
|
static boolean |
isMultipart(String a)
Returns true if media type is a multiparted file. |
|
static boolean |
isText(String a)
Returns true if media type a matches text/* |
|
static boolean |
isXml(String a)
Returns true if media type a matches application/xml, text/xml or application/*+xml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MimeTypeHelper()
Method Detail |
---|
public static String getCharset(String mediatype)
public static boolean isMatch(String a, String b)
public static boolean isMatch(javax.activation.MimeType a, javax.activation.MimeType b)
public static boolean isMatch(javax.activation.MimeType a, javax.activation.MimeType b, boolean includeparams)
public static boolean isApp(String a)
public static boolean isAtom(String a)
public static boolean isEntry(String a)
public static boolean isFeed(String a)
public static boolean isXml(String a)
public static boolean isText(String a)
public static boolean isMimeType(String a)
public static <T extends Base> String getMimeType(T base)
public static String[] condense(String... types)
public static Comparator<String> getComparator()
public static int compare(javax.activation.MimeType mt1, javax.activation.MimeType mt2)
public static int compare(String t1, String t2)
public static boolean isMultipart(String a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |