>>68
long x = 0x0123456789abcdefL;
byte[] y = new byte[8];
java.nio.ByteBuffer.wrap(y).putLong(x);
for (byte b : y) System.out.printf("%02x ", b);
バイトオーダーを変えたいならorderで変更