com.sun.tools.xjc.util
Class MimeTypeRange
java.lang.Object
com.sun.tools.xjc.util.MimeTypeRange
public class MimeTypeRange
- extends java.lang.Object
Field Summary |
static MimeTypeRange |
ALL
|
java.lang.String |
majorType
|
java.util.Map<java.lang.String,java.lang.String> |
parameters
|
float |
q
Each media-range MAY be followed by one or more accept-params,
beginning with the "q" parameter for indicating a relative quality
factor. |
java.lang.String |
subType
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
majorType
public final java.lang.String majorType
subType
public final java.lang.String subType
parameters
public final java.util.Map<java.lang.String,java.lang.String> parameters
q
public final float q
- Each media-range MAY be followed by one or more accept-params,
beginning with the "q" parameter for indicating a relative quality
factor. The first "q" parameter (if any) separates the media-range
parameter(s) from the accept-params. Quality factors allow the user
or user agent to indicate the relative degree of preference for that
media-range, using the qvalue scale from 0 to 1 (section 3.9). The
default value is q=1.
ALL
public static final MimeTypeRange ALL
MimeTypeRange
public MimeTypeRange(java.lang.String s)
throws java.text.ParseException
- Throws:
java.text.ParseException
parseRanges
public static java.util.List<MimeTypeRange> parseRanges(java.lang.String s)
throws java.text.ParseException
- Throws:
java.text.ParseException
toMimeType
public javax.activation.MimeType toMimeType()
throws javax.activation.MimeTypeParseException
- Throws:
javax.activation.MimeTypeParseException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
merge
public static MimeTypeRange merge(java.util.Collection<MimeTypeRange> types)
- Creates a range by merging all the given types.
main
public static void main(java.lang.String[] args)
throws java.text.ParseException
- Throws:
java.text.ParseException