Package nom.tam.util
Class AsciiFuncs
java.lang.Object
nom.tam.util.AsciiFuncs
- Author:
- tmcglynn
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringasciiString(byte[] buf) Convert to ASCII or return null if not compatible.static StringasciiString(byte[] buf, int start, int len) Convert to ASCII or return null if not compatible.static byte[]Convert an ASCII string to bytes.static booleanisWhitespace(char character)
-
Method Details
-
asciiString
Convert to ASCII or return null if not compatible.- Parameters:
buf- the bytes representing a string- Returns:
- the String represented by the bytes
-
asciiString
Convert to ASCII or return null if not compatible.- Parameters:
buf- buffer to get the string bytes fromstart- the position where the string startslen- the length of the string- Returns:
- the extracted string
-
getBytes
Convert an ASCII string to bytes.- Parameters:
in- the string to convert- Returns:
- the string converted to bytes
-
isWhitespace
public static boolean isWhitespace(char character) - Parameters:
character- the charater to check- Returns:
- true is the character is a whitespace.
-