Android Byte Array to Unicode Convert upperToLower(byte[] b)

Here you can find the source of upperToLower(byte[] b)

Description

upper To Lower

Declaration

public static void upperToLower(byte[] b) 

Method Source Code

//package com.java2s;

public class Main {

    public static void upperToLower(byte[] b) {
        int len = b.length;
        if ((len & 1) == 1) {
            b[len - 1] = '\0';
            len--;//from w w  w.  j a  va  2  s .c  om
        }
        for (int i = 0; i < len; i += 2) {
            int high = b[i] & 0xff;
            int low = b[i + 1] & 0xff;
            if (high == '\0' || low == '\0') {
                break;
            } else if (high == 0x23 && (low >= 0x41 && low <= 0x5a)) {
                b[i + 1] = (byte) (low + 0x20);
            }
        }
    }
}

Related

  1. toBase58(byte[] b)
  2. ushort2bytesBE(int val, byte[] b, int off)
  3. ushort2bytesLE(int val, byte[] b, int off)
  4. convertLongVowel(byte[] b)
  5. bcdToString(byte[] data, int offset, int length)
  6. upperToLowerLatin(byte[] b)
  7. tag2bytesBE(int tag, byte[] b, int off)
  8. tag2bytesLE(int tag, byte[] b, int off)
  9. parseToBnW(byte[] data, int length)