Methods Summary |
---|
public java.lang.Object | clone()Copies the current instance.
StatusLine retval = new StatusLine();
if (this.sipVersion != null)
retval.sipVersion = new String(this.sipVersion);
retval.statusCode = this.statusCode;
if (this.reasonPhrase != null)
retval.reasonPhrase = new String(this.reasonPhrase);
return retval;
|
public java.lang.String | encode()Encodes into a canonical form.
clazz = new StatusLine().getClass();
String encoding = SIPConstants.SIP_VERSION_STRING + Separators.SP +
statusCode;
if (reasonPhrase != null) encoding += Separators.SP + reasonPhrase;
encoding += Separators.NEWLINE;
return encoding;
|
public boolean | equals(java.lang.Object that)Compares this instance to the requested object.
if (that instanceof StatusLine)
return this.statusCode == ((StatusLine)that).statusCode;
else return false;
|
public java.lang.String | getReasonPhrase()Gets the ReasonPhrase field.
return reasonPhrase;
|
public java.lang.String | getSipVersion()Gets the Sip Version.
return sipVersion;
|
public int | getStatusCode()Gets the Status Code.
return statusCode;
|
public java.lang.String | getVersionMajor()Gets the major version number.
if (sipVersion == null)
return null;
String major = null;
boolean slash = false;
for (int i = 0; i < sipVersion.length(); i++) {
if (sipVersion.charAt(i) == '.") slash = false;
if (slash) {
if (major == null)
major = "" + sipVersion.charAt(i);
else major += sipVersion.charAt(i);
}
if (sipVersion.charAt(i) == '/") slash = true;
}
return major;
|
public java.lang.String | getVersionMinor()Gets the minor version number.
if (sipVersion == null)
return null;
String minor = null;
boolean dot = false;
for (int i = 0; i < sipVersion.length(); i++) {
if (dot) {
if (minor == null)
minor = "" + sipVersion.charAt(i);
else minor += sipVersion.charAt(i);
}
if (sipVersion.charAt(i) == '.") dot = true;
}
return minor;
|
public void | setReasonPhrase(java.lang.String reasonPhrase)Set the reasonPhrase member.
this.reasonPhrase = reasonPhrase;
|
public void | setSipVersion(java.lang.String s)Sets the sipVersion member.
sipVersion = s;
|
public void | setStatusCode(int statusCode)Sets the statusCode member.
this.statusCode = statusCode;
|