@@ -0,0 +1,611 @@
+package backend;%0A%0Aimport java.nio.ByteBuffer;%0A/**%0A * %0A * @author Fitria%0A * added this function to convert bytes to any types%0A * from now long to byte is done%0A * if necessary, will add bytes convertion to another types here%0A *%0A */%0A%0Apublic class ByteUtils %7B%0A%09static public byte%5B%5D longToBytes(long x) %7B%0A%09    ByteBuffer buffer = ByteBuffer.allocate(Long.SIZE);%0A%09    buffer.putLong(x);%0A%09    return buffer.array();%0A%09%7D%0A%0A%09static public long bytesToLong(byte%5B%5D bytes) %7B%0A%09    ByteBuffer buffer = ByteBuffer.allocate(Long.SIZE);%0A%09    buffer.put(bytes);%0A%09    buffer.flip();//need flip %0A%09    return buffer.getLong();%0A%09%7D%0A%09%0A%7D%0A

add byte convertion class