|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mulgara.util.Strings
public class Strings
String utilities.
| Constructor Summary | |
|---|---|
Strings()
|
|
| Method Summary | |
|---|---|
static String |
indent(int indent)
Returns a string containing an indentation. |
static byte[] |
parseHexToBytes(String hex)
Converts a string of hexadecimal characters into a byte array. |
static QName |
parseQName(URI u)
Converts a URI into a QName, based entirely on parsing. |
static int |
startOfName(String s)
Determines the start of a name in a URI that can be turned into a QName. |
static String |
toHexString(byte[] data)
Converts a byte array to a string with each byte being represented by a pair of hexadecimal characters. |
static byte[] |
toUtf8Bytes(String str)
Converts a string to a byte array with UTF8. |
static String |
xmlEscape(String s)
Search for disallowed XML characters in a string, and replace them with their escape codes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Strings()
| Method Detail |
|---|
public static final byte[] toUtf8Bytes(String str)
str - The string to convert.
InternalError - If UTF-8 encoding fails.public static final byte[] parseHexToBytes(String hex)
toHexString(byte[])
hex - The string of hex characters. These must appear in pairs that form bytes.
IllegalArgumentException - If the string has an odd number of characters, or any characters are not valid hexadecimal characters.public static final String toHexString(byte[] data)
parseHexToBytes(java.lang.String).
data - The data to convert.
public static QName parseQName(URI u)
u - The URI to parse.
public static int startOfName(String s)
s - The string to search.
public static String indent(int indent)
indent - The number of indentations to use.
public static String xmlEscape(String s)
s - The string to escape.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||