Java Hex Calculate ToHexString(long[] data)

Here you can find the source of ToHexString(long[] data)

Description

To Hex String

License

Open Source License

Declaration

private static String ToHexString(long[] data) 

Method Source Code

//package com.java2s;

public class Main {
    private static String ToHexString(long[] data) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < data.length; i++) {
            sb.append(PadLeft(Long.toHexString(data[i]), 16));
        }/* w  w  w  .j  a v  a 2  s. c o m*/
        return sb.toString();
    }

    private static String PadLeft(String source, int length) {
        while (source.length() < length) {
            source = '0' + source;
        }
        return source;
    }
}

Related

  1. toHexString(long l)
  2. toHexString(long l)
  3. toHexString(long l)
  4. toHexString(long value, int digits)
  5. toHexString(long value, int digits)
  6. toHexString(String data)
  7. toHexString(String input)
  8. toHexString(String s)
  9. toHexString(String s)