Java Byte Array Convert To bytesToAlphaNumeric(byte[] number)

Here you can find the source of bytesToAlphaNumeric(byte[] number)

Description

Converts bytes representing the phone number alphanumeric value for digit and letters

License

Apache License

Parameter

Parameter Description
number ASCII value of alphabet letters A..Z or digits 0..9

Return

String representing the phone number

Declaration

static String bytesToAlphaNumeric(byte[] number) 

Method Source Code

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

public class Main {
    /**/*from ww w.  java  2s .co m*/
     * Converts bytes representing the phone number alphanumeric value for digit and letters
     * @param number ASCII value of alphabet letters A..Z or digits 0..9
     * @return String representing the phone number
     */
    static String bytesToAlphaNumeric(byte[] number) {
        StringBuilder alphaNumeric = new StringBuilder();
        for (short n : number) {
            alphaNumeric.append(Character.toChars(n));
        }
        return alphaNumeric.toString();
    }
}

Related

  1. Bytes4ToInt(byte abyte0[], int offset)
  2. Bytes8ToLong(byte abyte0[], int offset)
  3. bytes_to_sbuf(byte[] data, int offset, int length, StringBuffer buf)
  4. bytes_to_short(byte[] buf, int offset)
  5. bytes_to_str(byte[] data)
  6. bytesToAsciiMaybe(byte[] data)
  7. bytesToBlocks(final long bytes, final int blockSize)
  8. bytesToBool(byte[] data, int[] offset)
  9. bytesToBoxingBytes(final byte[] bytes)