org.sblim.slp.internal
Class SLPString

java.lang.Object
  extended byorg.sblim.slp.internal.SLPString

public class SLPString
extends java.lang.Object

 This class provides functions for comparision of SLP message strings.
 
 From RFC 2608:
 
 String comparison for order and equality in SLP MUST be case
 insensitive inside the 0x00-0x7F subrange of UTF-8 (which corresponds
 to ASCII character encoding).  Case insensitivity SHOULD be supported
 throughout the entire UTF-8 encoded Unicode [6] character set.

 The case insensitivity rule applies to all string matching in SLPv2,
 including Scope strings, SLP SPI strings, service types, attribute
 tags and values in query handling, language tags, previous responder
 lists.  Comparisons of URL strings, however, is case sensitive.

 White space (SPACE, CR, LF, TAB) internal to a string value is folded
 to a single SPACE character for the sake of string comparisons.
 White space preceding or following a string value is ignored for the
 purposes of string comparison.  For example, "  Some String  "
 matches "SOME    STRING".
 


Constructor Summary
SLPString()
           
 
Method Summary
static int compare(java.lang.String pStr0, java.lang.String pStr1)
          compare
static boolean equals(java.lang.String pStr0, java.lang.String pStr1)
          equals
static java.lang.String unify(java.lang.String pStr)
          public for testing only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SLPString

public SLPString()
Method Detail

equals

public static boolean equals(java.lang.String pStr0,
                             java.lang.String pStr1)
equals

Parameters:
pStr0 -
pStr1 -
Returns:
boolean

compare

public static int compare(java.lang.String pStr0,
                          java.lang.String pStr1)
compare

Parameters:
pStr0 -
pStr1 -
Returns:
int

unify

public static java.lang.String unify(java.lang.String pStr)
public for testing only.

Parameters:
pStr -
Returns:
String


Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.