Java ASCII to Hex asciiToHexStr(String src)

Here you can find the source of asciiToHexStr(String src)

Description

ascii To Hex Str

License

Apache License

Declaration

public static String asciiToHexStr(String src) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String asciiToHexStr(String src) {
        StringBuilder sBuilder = new StringBuilder();
        for (int i = 0; i < src.length(); i++)
            sBuilder.append(String.format("%02X", Integer.valueOf(src.charAt(i))));
        return sBuilder.toString();
    }/*from   w  w  w .ja v  a2  s  . co  m*/
}

Related

  1. ASCIIToHex(int args, int len)
  2. asciiToHex(String ascii)
  3. asciiToHex(String ascii)
  4. asciiToHex(String ascii)
  5. asciiToHex(String asciiValue)