|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.tmaj.util.StringFormatUtils
public final class StringFormatUtils
Contains utility methods for formatting Strings.
Method Summary | |
---|---|
static byte[] |
decodeBase64(java.lang.String encodedString)
Gets the byte array for base64 encoded string |
static java.lang.String |
encodeBase64(byte[] bytes)
Gets the String representation of a byte array using base64 encoding. |
static java.lang.String |
formatKey(java.lang.String key)
Converts a string into lower case and removes any underscores or hypens. |
static java.lang.String |
getClassFormat(java.lang.Object obj)
Returns the classname of an object in parenthesis without the package information. |
static java.lang.String |
getExtension(java.io.File file)
|
static boolean |
isStringEmpty(java.lang.String string)
|
static java.lang.String |
truncateString(java.lang.String s,
int maxLength)
Returns a string no longer than maxLength; if s exceeds maxLength, ".." is appended after the string is truncated. |
static java.lang.String |
zeroPad(int number,
int minLength)
Puts zeros at the beginning of a string if string length is less than min length. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String truncateString(java.lang.String s, int maxLength)
public static java.lang.String zeroPad(int number, int minLength)
public static java.lang.String encodeBase64(byte[] bytes)
public static byte[] decodeBase64(java.lang.String encodedString) throws java.io.IOException
java.io.IOException
public static java.lang.String getClassFormat(java.lang.Object obj)
public static java.lang.String formatKey(java.lang.String key)
public static boolean isStringEmpty(java.lang.String string)
public static java.lang.String getExtension(java.io.File file)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |