PageRenderTime 145ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/core/src/gov2/nist/javax2/sip/header/ReferTo.java

http://android-rcs-ims-stack.googlecode.com/
Java | 146 lines | 26 code | 8 blank | 112 comment | 7 complexity | ab5b4d2b088ed046f444908e9c73b062 MD5 | raw file
Possible License(s): Apache-2.0, JSON, BSD-3-Clause
  1. /*
  2. * Conditions Of Use
  3. *
  4. * This software was developed by employees of the National Institute of
  5. * Standards and Technology (NIST), an agency of the Federal Government.
  6. * Pursuant to title 15 Untied States Code Section 105, works of NIST
  7. * employees are not subject to copyright protection in the United States
  8. * and are considered to be in the public domain. As a result, a formal
  9. * license is not needed to use the software.
  10. *
  11. * This software is provided by NIST as a service and is expressly
  12. * provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
  13. * OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
  14. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
  15. * AND DATA ACCURACY. NIST does not warrant or make any representations
  16. * regarding the use of the software or the results thereof, including but
  17. * not limited to the correctness, accuracy, reliability or usefulness of
  18. * the software.
  19. *
  20. * Permission to use this software is contingent upon your acceptance
  21. * of the terms of this agreement
  22. *
  23. * .
  24. *
  25. */
  26. /*******************************************************************************
  27. * Product of NIST/ITL Advanced Networking Technologies Division (ANTD). *
  28. *******************************************************************************/
  29. package gov2.nist.javax2.sip.header;
  30. import gov2.nist.javax2.sip.address.*;
  31. /**
  32. * ReferTo SIP Header.
  33. *
  34. * @version 1.2 $Revision: 1.6 $ $Date: 2009/07/17 18:57:35 $
  35. *
  36. * @author M. Ranganathan <br/>
  37. * @author Olivier Deruelle <br/>
  38. *
  39. *
  40. *
  41. */
  42. public final class ReferTo
  43. extends AddressParametersHeader
  44. implements javax2.sip.header.ReferToHeader {
  45. /**
  46. * Comment for <code>serialVersionUID</code>
  47. */
  48. private static final long serialVersionUID = -1666700428440034851L;
  49. /** default Constructor.
  50. */
  51. public ReferTo() {
  52. super(NAME);
  53. }
  54. /**
  55. * Encode the header content into a String.
  56. * @return String
  57. */
  58. protected String encodeBody() {
  59. if (address == null)
  60. return null;
  61. String retval = "";
  62. if (address.getAddressType() == AddressImpl.ADDRESS_SPEC) {
  63. retval += LESS_THAN;
  64. }
  65. retval += address.encode();
  66. if (address.getAddressType() == AddressImpl.ADDRESS_SPEC) {
  67. retval += GREATER_THAN;
  68. }
  69. if (!parameters.isEmpty()) {
  70. retval += SEMICOLON + parameters.encode();
  71. }
  72. return retval;
  73. }
  74. }
  75. /*
  76. * $Log: ReferTo.java,v $
  77. * Revision 1.6 2009/07/17 18:57:35 emcho
  78. * Converts indentation tabs to spaces so that we have a uniform indentation policy in the whole project.
  79. *
  80. * Revision 1.5 2006/07/13 09:01:40 mranga
  81. * Issue number:
  82. * Obtained from:
  83. * Submitted by: jeroen van bemmel
  84. * Reviewed by: mranga
  85. * Moved some changes from jain-sip-1.2 to java.net
  86. *
  87. * CVS: ----------------------------------------------------------------------
  88. * CVS: Issue number:
  89. * CVS: If this change addresses one or more issues,
  90. * CVS: then enter the issue number(s) here.
  91. * CVS: Obtained from:
  92. * CVS: If this change has been taken from another system,
  93. * CVS: then name the system in this line, otherwise delete it.
  94. * CVS: Submitted by:
  95. * CVS: If this code has been contributed to the project by someone else; i.e.,
  96. * CVS: they sent us a patch or a set of diffs, then include their name/email
  97. * CVS: address here. If this is your work then delete this line.
  98. * CVS: Reviewed by:
  99. * CVS: If we are doing pre-commit code reviews and someone else has
  100. * CVS: reviewed your changes, include their name(s) here.
  101. * CVS: If you have not had it reviewed then delete this line.
  102. *
  103. * Revision 1.3 2006/06/19 06:47:26 mranga
  104. * javadoc fixups
  105. *
  106. * Revision 1.2 2006/06/16 15:26:28 mranga
  107. * Added NIST disclaimer to all public domain files. Clean up some javadoc. Fixed a leak
  108. *
  109. * Revision 1.1.1.1 2005/10/04 17:12:35 mranga
  110. *
  111. * Import
  112. *
  113. *
  114. * Revision 1.3 2004/01/22 13:26:29 sverker
  115. * Issue number:
  116. * Obtained from:
  117. * Submitted by: sverker
  118. * Reviewed by: mranga
  119. *
  120. * Major reformat of code to conform with style guide. Resolved compiler and javadoc warnings. Added CVS tags.
  121. *
  122. * CVS: ----------------------------------------------------------------------
  123. * CVS: Issue number:
  124. * CVS: If this change addresses one or more issues,
  125. * CVS: then enter the issue number(s) here.
  126. * CVS: Obtained from:
  127. * CVS: If this change has been taken from another system,
  128. * CVS: then name the system in this line, otherwise delete it.
  129. * CVS: Submitted by:
  130. * CVS: If this code has been contributed to the project by someone else; i.e.,
  131. * CVS: they sent us a patch or a set of diffs, then include their name/email
  132. * CVS: address here. If this is your work then delete this line.
  133. * CVS: Reviewed by:
  134. * CVS: If we are doing pre-commit code reviews and someone else has
  135. * CVS: reviewed your changes, include their name(s) here.
  136. * CVS: If you have not had it reviewed then delete this line.
  137. *
  138. */