|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.semanticdesktop.aperture.util.StringUtil
public class StringUtil
Provides utility methods for String handling.
Constructor Summary | |
---|---|
StringUtil()
|
Method Summary | |
---|---|
static String |
replace(String olds,
String news,
String text)
Substitute String "old" by String "new" in String "text" everywhere. |
static String |
sha1Hash(byte[] bytes)
Computes the SHA1 hash for the given byte array. |
static String |
sha1Hash(String string)
Computes the SHA1 hash for the given string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtil()
Method Detail |
---|
public static String replace(String olds, String news, String text)
olds
- The String to be substituted.news
- The String containing the new content.text
- The String in which the substitution is done.
public static String sha1Hash(String string)
The code has been 'borrowed' from the mimedir-parser available from http://ilrt.org/discovery/2003/02/cal/mimedir-parser/
string
- The string for which we'd like to get the SHA1 hash.
public static String sha1Hash(byte[] bytes)
bytes
- the byte array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |