trackerBT
Class Utils
java.lang.Object
trackerBT.Utils
public class Utils
- extends java.lang.Object
A set of utility methods used by several classes
Constructor Summary |
Utils()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
byteArrayToByteString
public static java.lang.String byteArrayToByteString(byte[] in)
- Convert a byte[] array to readable string format. This makes the "hex"
readable!
- Parameters:
in
- byte[] buffer to convert to string format
- Returns:
- result String buffer in String format
byteArrayToURLString
public static java.lang.String byteArrayToURLString(byte[] in)
byteStringToByteArray
public static java.lang.String byteStringToByteArray(java.lang.String s)
hash
public static byte[] hash(byte[] hashThis)
- Compute the SHA1 hash of the array in parameter
- Parameters:
hashThis
- The array to be hashed
- Returns:
- byte[] The SHA1 hash