Android Utililty Methods ASCII to Byte Array Convert

List of utility methods to do ASCII to Byte Array Convert

Description

The list of methods to do ASCII to Byte Array Convert are organized into topic(s).

Method

byte[]fromAscii(byte[] ascii)
Decodes a byte array where each byte represents an ascii '0' or '1'.
if (ascii == null || ascii.length == 0) {
    return EMPTY_BYTE_ARRAY;
byte[] l_raw = new byte[ascii.length >> 3];
for (int ii = 0, jj = ascii.length - 1; ii < l_raw.length; ii++, jj -= 8) {
    for (int bits = 0; bits < BITS.length; ++bits) {
        if (ascii[jj - bits] == '1') {
            l_raw[ii] |= BITS[bits];
...
byte[]fromAscii(char[] ascii)
Decodes a byte array where each char represents an ascii '0' or '1'.
if (ascii == null || ascii.length == 0) {
    return EMPTY_BYTE_ARRAY;
byte[] l_raw = new byte[ascii.length >> 3];
for (int ii = 0, jj = ascii.length - 1; ii < l_raw.length; ii++, jj -= 8) {
    for (int bits = 0; bits < BITS.length; ++bits) {
        if (ascii[jj - bits] == '1') {
            l_raw[ii] |= BITS[bits];
...