- 论坛徽章:
- 0
|
这个函数怎么转化成PHP的
private static void longToByteArray(long lValue,
byte[] buffer,
int nStartIndex)
{
buffer[nStartIndex] = (byte) (lValue >>> 56);
buffer[nStartIndex + 1] = (byte) ((lValue >>> 48) & 0x0ff);
buffer[nStartIndex + 2] = (byte) ((lValue >>> 40) & 0x0ff);
buffer[nStartIndex + 3] = (byte) ((lValue >>> 32) & 0x0ff);
buffer[nStartIndex + 4] = (byte) ((lValue >>> 24) & 0x0ff);
buffer[nStartIndex + 5] = (byte) ((lValue >>> 16) & 0x0ff);
buffer[nStartIndex + 6] = (byte) ((lValue >>> 8) & 0x0ff);
buffer[nStartIndex + 7] = (byte) lValue;
}
[ 本帖最后由 HonestQiao 于 2007-1-8 14:06 编辑 ] |
|