public abstract class ParametersImpl extends SipHeaderImpl implements Parameters
Modifier | Constructor and Description |
---|---|
protected |
ParametersImpl(Buffer name,
Buffer params) |
Modifier and Type | Method and Description |
---|---|
Buffer |
getParameter(Buffer name)
Get the value of the named parameter.
|
Buffer |
getParameter(String name)
Same as
Parameters.getParameter(Buffer) . |
Buffer |
getValue()
Will only return the parameters.
|
Buffer |
setParameter(Buffer name,
Buffer value)
Sets the value of the specified parameter.
|
protected void |
transferValue(Buffer dst)
Transfer the bytes of the value into the destination.
|
clone, getBytes, getName, toString, verify
public Buffer getParameter(Buffer name) throws SipParseException
Parameters
Buffer
, which can be checked with Buffer.isEmpty()
or
Buffer.capacity()
, which will return zero. As with any empty
Buffer
, if you do Buffer.toString()
you will be getting
an empty String
back, which would be yet another way to check for
a flag parameter.getParameter
in interface Parameters
name
- the name of the parameter we are looking for.SipParseException
- in case anything goes wrong while extracting the parameter.public Buffer getParameter(String name) throws SipParseException
Parameters
Parameters.getParameter(Buffer)
.getParameter
in interface Parameters
SipParseException
- in case anything goes wrong while extracting the parameter.public Buffer setParameter(Buffer name, Buffer value) throws SipParseException, IllegalArgumentException
Parameters
setParameter
in interface Parameters
name
- the name of the parametervalue
- the value of the parameter or null if you just want to set a
flag parameterSipParseException
- in case anything goes wrong when setting the parameter.IllegalArgumentException
- in case the name is null or empty.public Buffer getValue()
getValue
in interface SipHeader
getValue
in class SipHeaderImpl
protected void transferValue(Buffer dst)
SipHeaderImpl
transferValue
in class SipHeaderImpl
Copyright © 2013. All Rights Reserved.