net.noderunner.http
Class ContentType.Parameter

java.lang.Object
  extended by net.noderunner.http.ContentType.Parameter
Enclosing class:
ContentType

public static final class ContentType.Parameter
extends Object

Content type parameter, see parameter definition in RFC 2045. Immutable class.

Author:
Elias Ross

Constructor Summary
ContentType.Parameter(String attribute, String value)
          Constructs a new Parameter.
 
Method Summary
 String getAttribute()
          Returns attribute.
 String getQuoteValue()
          Returns the quoted value of this parameter.
 String getValue()
          Returns value, unquoted.
 String toString()
          Returns a formatted attribute=value string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentType.Parameter

public ContentType.Parameter(String attribute,
                             String value)
Constructs a new Parameter.

Parameters:
attribute - valid attribute token
value - unquoted, raw value
Throws:
IllegalArgumentException - if attribute or value is invalid
Method Detail

getAttribute

public String getAttribute()
Returns attribute.


getValue

public String getValue()
Returns value, unquoted.


getQuoteValue

public String getQuoteValue()
Returns the quoted value of this parameter.


toString

public String toString()
Returns a formatted attribute=value string.

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.