Java ASCII from toAscii(byte[] ba)

Here you can find the source of toAscii(byte[] ba)

Description

to Ascii

License

Open Source License

Declaration

public static String toAscii(byte[] ba) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String toAscii(byte[] ba) {
        StringBuilder sb = new StringBuilder();
        for (byte b : ba) {
            sb.append(Integer.toHexString(0xff & b));
        }/*from w  ww .  j a v  a 2s  .  c  o m*/
        return sb.toString();
    }
}

Related

  1. toAscii(byte[] b)
  2. toAscii(char ch)
  3. toAscii(char source)
  4. toAscii(int i, boolean reversed)
  5. toAscii(int number)