FileDocCategorySizeDatePackage
MediaRange.javaAPI DocphoneME MR2 API (J2ME)3098Wed May 02 18:00:42 BST 2007gov.nist.siplite.header

MediaRange

public class MediaRange extends GenericObject
Media Range.
since
0.9
version
1.0
Revisions:

Version 1.0
1. Added encode method.

media-range = ( "STAR/STAR"
| ( type "/" STAR )
| ( type "/" subtype )
) *( ";" parameter )

HTTP RFC 2616 Section 14.1

Fields Summary
protected String
type
Media range type field.
protected String
subtype
Media range subtype field.
Constructors Summary
public MediaRange()
Default constructor.

    
Methods Summary
public java.lang.Objectclone()
Copies the current instance.

return
copy of the current object.

        MediaRange retval = new MediaRange();
        if (type != null)
            retval.type = new String(this.type);
        if (subtype != null)
            retval.subtype = new String(this.subtype);
        return retval;
    
public java.lang.Stringencode()
Encodes the object.

return
String canonical encoded version of this object.

        String encoding = type + Separators.SLASH + subtype;
        return encoding;
    
public java.lang.StringgetSubtype()
Gets the media range subtype field.

return
the sub type field value

        return subtype;
    
public java.lang.StringgetType()
Gets the media range type field.

return
the type field value

        return type;
    
public voidsetSubtype(java.lang.String s)
Sets the media range subtype member.

param
s String to set

        subtype = s;
    
public voidsetType(java.lang.String t)
Sets the media range type member....

param
t String to set

        type = t;
    
public java.lang.StringtoString()
Encodes the object. Calls encode().

return
String canonical encoded version of this object.

        return encode();