Java Hex Calculate toHexString(String str)

Here you can find the source of toHexString(String str)

Description

to Hex String

License

Apache License

Declaration

public static String[] toHexString(String str) 

Method Source Code

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

public class Main {

    public static String[] toHexString(String str) {
        char[] chars = str.toCharArray();

        String[] result = new String[chars.length];

        for (int i = 0; i < chars.length; i++) {
            result[i] = Integer.toHexString((int) chars[i]);
        }/*w  ww .j  a  va 2  s .  c  om*/

        return result;
    }
}

Related

  1. toHexString(String data)
  2. toHexString(String input)
  3. toHexString(String s)
  4. toHexString(String s)
  5. toHexString(String s)
  6. toHexString(String str)
  7. toHexString(StringBuffer buffer, byte[] bytes, int numBytes)
  8. toHexString0x(byte[] byteArray)
  9. toHexString2(int i)