Methods Summary |
---|
public java.lang.Object | clone()Copies the current instance.
ContentTypeHeader retval = new ContentTypeHeader();
retval.parameters = (NameValueList) this.parameters.clone();
retval.mediaRange = (MediaRange)this.mediaRange.clone();
return retval;
|
public int | compareMediaRange(java.lang.String media)Compares two MediaRange headers.
return compareToIgnoreCase
(mediaRange.type + "/" + mediaRange.subtype, media);
|
public java.lang.String | encodeBody()Encodes into a canonical string.
if (hasParameters())
return new StringBuffer(mediaRange.encode())
.append(encodeWithSep()).toString();
else return mediaRange.encode();
|
public java.lang.String | getCharset()Gets the charset parameter.
return this.getParameter("charset");
|
public java.lang.String | getContentSubType()Gets the content subtype.
return mediaRange == null ? null : mediaRange.getSubtype();
|
public java.lang.String | getContentTypeHeader()Get the content subtype.
return mediaRange == null ? null : mediaRange.getType();
|
public MediaRange | getMediaRange()Gets the mediaRange field.
return mediaRange;
|
public java.lang.String | getMediaSubType()Gets the MediaSubType field.
return mediaRange.subtype;
|
public java.lang.String | getMediaType()Gets the Media Type.
return mediaRange.type;
|
public java.lang.Object | getValue()Gets the content type header value.
return this.mediaRange;
|
public void | setContentSubType(java.lang.String contentType)Sets the content subtype.
if (contentType == null)
throw new NullPointerException("null arg");
if (mediaRange == null) mediaRange = new MediaRange();
mediaRange.setSubtype(contentType);
|
public void | setContentType(java.lang.String contentType, java.lang.String contentSubType)Sets the content type and subtype.
if (mediaRange == null) mediaRange = new MediaRange();
mediaRange.setType(contentType);
mediaRange.setSubtype(contentSubType);
|
public void | setContentType(java.lang.String contentType)Sets the content type.
if (contentType == null)
throw new NullPointerException("null arg");
if (mediaRange == null) mediaRange = new MediaRange();
mediaRange.setType(contentType);
|
public void | setMediaRange(MediaRange m)Sets the mediaRange member
mediaRange = m;
|