Android Hex String Create convertToHex(byte[] data)

Here you can find the source of convertToHex(byte[] data)

Description

convert To Hex

Declaration

private static String convertToHex(byte[] data)
            throws java.io.IOException 

Method Source Code

//package com.java2s;

import android.util.Base64;

public class Main {
    private static String convertToHex(byte[] data)
            throws java.io.IOException {

        StringBuffer sb = new StringBuffer();
        String hex = null;//  w w w. j  a  va2 s. co  m

        hex = Base64
                .encodeToString(data, 0, data.length, Base64.NO_PADDING);

        sb.append(hex);

        return sb.toString();
    }
}

Related

  1. decodeHexStr(final String str)
  2. hexDigest(String input)
  3. hexToBt64(String hex)
  4. hexToBytes(String hex)
  5. convertToHex(byte[] data)
  6. byte2HexStr(byte[] b, int length)
  7. byte2hex(byte[] bytes)
  8. bytesToHex(byte[] bytes)
  9. encodeHex(byte[] bytes)