gov.nist.javax.sip
クラス Utils

java.lang.Object
  上位を拡張 gov.nist.javax.sip.Utils

public class Utils
extends java.lang.Object

A few utilities that are used in various places by the stack. This is used to convert byte arrays to hex strings etc. Generate tags and branch identifiers and odds and ends.

バージョン:
JAIN-SIP-1.1 $Revision: 1.6 $ $Date: 2004/07/23 06:50:04 $
作成者:
mranga

コンストラクタの概要
Utils()
           
 
メソッドの概要
static java.lang.String generateBranchId()
          Generate a cryptographically random identifier that can be used to generate a branch identifier.
static java.lang.String generateCallIdentifier(java.lang.String address)
          Generate a call identifier.
static java.lang.String generateTag()
          Generate a tag for a FROM header or TO header.
static java.lang.String getQuotedString(java.lang.String str)
          Put quotes around a string and return it.
static java.lang.String toHexString(byte[] b)
          convert an array of bytes to an hexadecimal string
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Utils

public Utils()
メソッドの詳細

toHexString

public static java.lang.String toHexString(byte[] b)
convert an array of bytes to an hexadecimal string

パラメータ:
b - bytes array to convert to a hexadecimal string
戻り値:
a string

getQuotedString

public static java.lang.String getQuotedString(java.lang.String str)
Put quotes around a string and return it.

パラメータ:
str - string to be quoted
戻り値:
a quoted string

generateCallIdentifier

public static java.lang.String generateCallIdentifier(java.lang.String address)
Generate a call identifier. This is useful when we want to generate a call identifier in advance of generating a message.


generateTag

public static java.lang.String generateTag()
Generate a tag for a FROM header or TO header. Just return a random 4 digit integer (should be enough to avoid any clashes!) Tags only need to be unique within a call.

戻り値:
a string that can be used as a tag parameter.

generateBranchId

public static java.lang.String generateBranchId()
Generate a cryptographically random identifier that can be used to generate a branch identifier.

戻り値:
a cryptographically random gloablly unique string that can be used as a branch identifier.