Java ASCII to Hex asciiToHex(String asciiValue)

Here you can find the source of asciiToHex(String asciiValue)

Description

ascii To Hex

License

Open Source License

Declaration

public static String asciiToHex(String asciiValue) 

Method Source Code

//package com.java2s;

public class Main {
    public static String asciiToHex(String asciiValue) {
        char[] chars = asciiValue.toCharArray();
        StringBuffer hex = new StringBuffer();
        for (int i = 0; i < chars.length; i++) {
            hex.append(Integer.toHexString(chars[i]));
        }/*from   w w w.  j  a  v  a  2  s  .  co  m*/
        return hex.toString();
    }
}

Related

  1. asciiToHex(byte[] src, int len, int padding)
  2. ASCIIToHex(int args, int len)
  3. asciiToHex(String ascii)
  4. asciiToHex(String ascii)
  5. asciiToHex(String ascii)
  6. asciiToHexStr(String src)