bug fixed for JDK6

This commit is contained in:
wenshao
2013-08-26 17:44:03 +08:00
parent e6c893c86f
commit a9c3137d77
2 changed files with 25 additions and 9 deletions
@@ -331,6 +331,16 @@ public class Utils {
byte[] bytes = md5Bytes(text);
return HexBin.encode(bytes, false);
}
public static void putLong(byte[] b, int off, long val) {
b[off + 7] = (byte) (val >>> 0);
b[off + 6] = (byte) (val >>> 8);
b[off + 5] = (byte) (val >>> 16);
b[off + 4] = (byte) (val >>> 24);
b[off + 3] = (byte) (val >>> 32);
b[off + 2] = (byte) (val >>> 40);
b[off + 1] = (byte) (val >>> 48);
b[off + 0] = (byte) (val >>> 56);
}
}