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

ParameterLessHeader

public class ParameterLessHeader extends Header
Use this class for the headers that can not have any parameters.

Fields Summary
public static Class
clazz
Class handle.
Constructors Summary
public ParameterLessHeader()
Default constructor for a generic parameter-less header.

        clazz = new ParameterLessHeader().getClass();
    
public ParameterLessHeader(String headerName)
Constructor given the name.

param
headerName is the header name.

        super(headerName);
    
public ParameterLessHeader(String headerName, String headerVal)
Constructor given the name and value.

param
headerName is the header name.
param
headerVal is the header value.

        super(headerName);
        headerValue = StringTokenizer.convertNewLines(headerVal.trim());
    
Methods Summary
public java.lang.StringencodeBody()
Encodes the body as a textstring.

return
encoded string of body contents

        return headerValue;
    
public NameValueListgetParameters()
Gets the parameter list (which is always empty) for this header.

return
always null

        return null;
    
public java.lang.ObjectgetValue()
Gets the value of the header without parameters.

return
value of extension header field

        return headerValue;
    
public voidsetName(java.lang.String name)
Sets the name for a generic header.

param
name the new name to be set

        headerName = name.trim();
    
public voidsetValue(java.lang.String value)
Sets the value without parameters for a generic header.

param
value the new value to be set

        headerValue = StringTokenizer.convertNewLines(value.trim());