Android Byte Array to ASCII Convert toAsciiString(byte[] output)

Here you can find the source of toAsciiString(byte[] output)

Description

to Ascii String

License

Apache License

Declaration

public static String toAsciiString(byte[] output) 

Method Source Code

//package com.java2s;
/**/*  www.  jav a2s  .c  om*/
 * Source obtained from crypto-gwt. Apache 2 License.
 * https://code.google.com/p/crypto-gwt/source/browse/crypto-gwt/src/main/java/com/googlecode/
 * cryptogwt/util/ByteArrayUtils.java
 */

public class Main {
    public static String toAsciiString(byte[] output) {
        char[] chars = new char[output.length];
        for (int i = 0; i < output.length; i++) {
            chars[i] = (char) output[i];
        }
        return new String(chars);
    }
}

Related

  1. getBCD4(byte[] b, int offset)
  2. bcdToAscii(byte[] bcdByte)
  3. bcdToAscii(byte[] bcdByte, int offset, int length)
  4. bcdToAscii(byte[] bcd_buf, int offset, byte[] ascii_buf, int asc_offset, int conv_len, int type)
  5. toAsciiString(byte[] data)