com.edustructures.util
Class ADKStringUtils

java.lang.Object
  extended by com.edustructures.util.ADKStringUtils

public class ADKStringUtils
extends java.lang.Object

Various static helper routines for manipulating text strings.


Constructor Summary
ADKStringUtils()
           
 
Method Summary
static java.lang.String encodeXML(java.lang.String str)
          Escapes an XML string by replacing the characters shown below with their equivalent entity references as defined by the XML specification.
static java.lang.String getStackTrace(java.lang.Throwable th)
           
static java.lang.String safePathString(java.lang.String path)
          Replaces characters that are illegal in filenames to underscores ("_").
static java.lang.String unencodeXML(java.lang.String str)
          Unescapes an XML string by replacing the entity references shown below with their equivalent characters as defined by the XML specification.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ADKStringUtils

public ADKStringUtils()
Method Detail

safePathString

public static java.lang.String safePathString(java.lang.String path)
Replaces characters that are illegal in filenames to underscores ("_").

Parameters:
path - A string to be used in a file path or file name
Returns:
The input string with illegal characters converted to an underscore. The following characters are replaced: : % / \ ; $ > < * . ? " | ! @

encodeXML

public static java.lang.String encodeXML(java.lang.String str)
Escapes an XML string by replacing the characters shown below with their equivalent entity references as defined by the XML specification.

CharacterEntity Reference
<&lt;
>&gt;
&&amp;
'&apos;
"&quot;

Parameters:
str - The source string
Returns:
The escaped string

unencodeXML

public static java.lang.String unencodeXML(java.lang.String str)
Unescapes an XML string by replacing the entity references shown below with their equivalent characters as defined by the XML specification.

CharacterEntity Reference
<&lt;
>&gt;
&&amp;
'&apos;
"&quot;

Parameters:
str - The source string
Returns:
The escaped string

getStackTrace

public static java.lang.String getStackTrace(java.lang.Throwable th)


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.