📄 sipheader.html
字号:
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SipHeader(java.lang.String, java.lang.String)"><!-- --></A><H3>
SipHeader</H3>
<PRE>
public <B>SipHeader</B>(java.lang.String name, java.lang.String headerValue)</PRE>
<DL>
<DD>Constructs a <tt>SipHeader</tt> from name value pair. For example: <p> name = <tt>Contact</tt> <p> value = <code><sip:UserB@192.168.200.201>;expires=3600</code> <p> It is allowed to give an empty String or <tt>null</tt> as the value parameter. This can be convenient when the user wants to fill the value and/or parameters later.
<P>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the header (Contact, Call-ID, ...). Leading and trailing spaces are ignored.<DD><CODE>headerValue</CODE> - full header value as String. It can be <tt>null</tt> or empty String. Leading and trailing spaces are ignored.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the header value or name are invalid<DD><CODE>java.lang.NullPointerException</CODE> - if name is null</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="setName(java.lang.String)"><!-- --></A><H3>
setName</H3>
<PRE>
public void <B>setName</B>(java.lang.String name)</PRE>
<DL>
<DD>Sets the header name, for example <tt>Contact</tt>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the header. Leading and trailing spaces are ignored.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if name is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the name is invalid</DL>
</DD>
</DL>
<HR>
<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public java.lang.String <B>getName</B>()</PRE>
<DL>
<DD>Returns the name of this header
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the name of this header as String</DL>
</DD>
</DL>
<HR>
<A NAME="getValue()"><!-- --></A><H3>
getValue</H3>
<PRE>
public java.lang.String <B>getValue</B>()</PRE>
<DL>
<DD>Returns the header value without header parameters. For example for header <code><sip:UserB@192.168.200.201>;expires=3600</code> the method returns <code><sip:UserB@192.168.200.201></code><br> In the case of an authorization or authentication header <tt>getValue()</tt> returns only the authentication scheme e.g. "Digest".
<P>
<DD><DL>
<DT><B>Returns:</B><DD>header value without header parameters. It is an empty String if the value was set to be <tt>null</tt> or empty.</DL>
</DD>
</DL>
<HR>
<A NAME="getHeaderValue()"><!-- --></A><H3>
getHeaderValue</H3>
<PRE>
public java.lang.String <B>getHeaderValue</B>()</PRE>
<DL>
<DD>Returns the full header value including parameters. For example <tt>"Alice <sip:alice@atlanta.com>;tag=1928301774"</tt>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>full header value including parameters</DL>
</DD>
</DL>
<HR>
<A NAME="setValue(java.lang.String)"><!-- --></A><H3>
setValue</H3>
<PRE>
public void <B>setValue</B>(java.lang.String value)</PRE>
<DL>
<DD>Sets the header value as String without parameters. For example <tt>"<sip:UserB@192.168.200.201>"</tt>. The existing (if any) header parameter values are not modified. Empty string or null means a header with no value.<p> For the authorization and authentication header this method sets the authentication scheme e.g. "Digest".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the value of the header. Leading and trailing spaces are ignored.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the value is invalid or there are parameters included.</DL>
</DD>
</DL>
<HR>
<A NAME="getParameter(java.lang.String)"><!-- --></A><H3>
getParameter</H3>
<PRE>
public java.lang.String <B>getParameter</B>(java.lang.String name)</PRE>
<DL>
<DD>Returns the value of one header parameter. For example, from value <tt>"<sip:UserB@192.168.200.201>;expires=3600"</tt> the method call <tt>getParameter("expires")</tt> will return <tt>3600</tt>. <p> Note that for some header parameters the returned value includes quotation marks while for other parameters it does not. As an example, the <tt>expires</tt> parameter contains its value without quotation marks while the <tt>realm</tt> parameter value contains quotation marks. The applications must be prepared to handle this difference.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the header parameter<DT><B>Returns:</B><DD>value of header parameter. Returns empty string for a parameter without value and null if the parameter does not exist.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if name is null</DL>
</DD>
</DL>
<HR>
<A NAME="getParameterNames()"><!-- --></A><H3>
getParameterNames</H3>
<PRE>
public java.lang.String[] <B>getParameterNames</B>()</PRE>
<DL>
<DD>Returns the names of header parameters. Returns <tt>null</tt> if there are no header parameters.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>names of the header parameters. Returns <tt>null</tt> if there are no parameters.</DL>
</DD>
</DL>
<HR>
<A NAME="setParameter(java.lang.String, java.lang.String)"><!-- --></A><H3>
setParameter</H3>
<PRE>
public void <B>setParameter</B>(java.lang.String name, java.lang.String value)</PRE>
<DL>
<DD>Sets value of header parameter. If parameter does not exist it will be added. For example, for header value <tt>"<sip:UserB@192.168.200.201>"</tt> calling <tt>setParameter("expires", "3600")</tt> will construct header value <tt>"<sip:UserB@192.168.200.201>;expires=3600"</tt>. <br> If the value is <tt>null</tt> or empty String, the parameter is interpreted as a parameter without value. <p> Note that some header parameters require the presence of quotation marks around the parameter value while other parameters do not. As an example, the <tt>expires</tt> parameter contains its value without quotation marks while the <tt>realm</tt> parameter value contains quotation marks. The applications must be prepared to handle this difference.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the header parameter. Leading and trailing spaces are ignored.<DD><CODE>value</CODE> - value of the parameter. Leading and trailing spaces are ignored.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if name is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the parameter name or value are invalid</DL>
</DD>
</DL>
<HR>
<A NAME="removeParameter(java.lang.String)"><!-- --></A><H3>
removeParameter</H3>
<PRE>
public void <B>removeParameter</B>(java.lang.String name)</PRE>
<DL>
<DD>Removes the header parameter, if it is found in this header.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the header parameter<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if name is null</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns the String representation of the header according to header type. For example: <UL> <LI><tt>From: Alice <sip:alice@atlanta.com>;tag=1928301774</tt><br> <LI><code>WWW-Authenticate: Digest realm="atlanta.com", domain="sip:boxesbybob.com", qop="auth", nonce="f84f1cec41e6cbe5aea9c8e88d359", opaque="", stale=FALSE, algorithm=MD5</code> </UL> The value part of the header may be missing if the header was created with empty string or <tt>null</tt> as <tt>value</tt> and has not been set using <tt>setValue</tt>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/microedition/sip/SipAddress.html" title="class in javax.microedition.sip"><B>PREV CLASS</B></A>
<A HREF="../../../javax/microedition/sip/SipRefreshHelper.html" title="class in javax.microedition.sip"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="SipHeader.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<font size=-1>Copyright © 2003-2007 Nokia Corporation. All Rights Reserved.<br/> Java is a trademark of Sun Microsystems, Inc.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -