@Test public void testRevertUnsignedLong(){ UnsignedLong unsignedLong = UnsignedLong.valueOf("12179241258665439971"); byte[] reversed = Util.revertUnsignedLong(unsignedLong); Assert.assertEquals("e3f28878655b05a9", Util.bytesToHex(reversed)); }
public static byte[] revertUnsignedLong(UnsignedLong input){ return ByteBuffer.allocate(Long.SIZE / 8).putLong(Long.reverseBytes(input.longValue())).array(); }
Util { public static byte[] revertUnsignedLong(UnsignedLong input){ return ByteBuffer.allocate(Long.SIZE / 8).putLong(Long.reverseBytes(input.longValue())).array(); } }
Util { public static byte[] revertUnsignedLong(UnsignedLong input){ return ByteBuffer.allocate(Long.SIZE / 8).putLong(Long.reverseBytes(input.longValue())).array(); }  }
Util { public static byte[] revertUnsignedLong(UnsignedLong input){ return ByteBuffer.allocate(Long.SIZE / 8).putLong(Long.reverseBytes(input.longValue())).array(); }  static byte[] hexToBytes(String s); static String bytesToHex(byte[] bytes); static byte[] hexlify(String data); static byte[] serializeLongToBytes(long data); static byte[] compress(byte[] inputBytes, int which); static byte[] decompress(byte[] inputBytes, int which); static byte[] revertInteger(Integer input); static byte[] revertShort(Short input); static byte[] revertLong(Long input); static byte[] revertUnsignedLong(UnsignedLong input); static byte[] revertBytes(byte[] array); static byte[] encryptAES(byte[] input, byte[] key); static byte[] decryptAES(byte[] input, byte[] key); static String byteToString(byte[] input); static double fromBase(AssetAmount assetAmount); static long toBase(double value, int precision); }
Util { public static byte[] revertUnsignedLong(UnsignedLong input){ return ByteBuffer.allocate(Long.SIZE / 8).putLong(Long.reverseBytes(input.longValue())).array(); }  static byte[] hexToBytes(String s); static String bytesToHex(byte[] bytes); static byte[] hexlify(String data); static byte[] serializeLongToBytes(long data); static byte[] compress(byte[] inputBytes, int which); static byte[] decompress(byte[] inputBytes, int which); static byte[] revertInteger(Integer input); static byte[] revertShort(Short input); static byte[] revertLong(Long input); static byte[] revertUnsignedLong(UnsignedLong input); static byte[] revertBytes(byte[] array); static byte[] encryptAES(byte[] input, byte[] key); static byte[] decryptAES(byte[] input, byte[] key); static String byteToString(byte[] input); static double fromBase(AssetAmount assetAmount); static long toBase(double value, int precision); static final String TAG; static final int LZMA; static final int XZ; static final int KEY_LENGTH; static final String TIME_DATE_FORMAT; }