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

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

Description

lower To Upper Latin

Declaration

public static void lowerToUpperLatin(byte[] b) 

Method Source Code

//package com.java2s;

public class Main {

    public static void lowerToUpperLatin(byte[] b) {
        int len = b.length;
        for (int i = 0; i < len; i++) {
            int ch = b[i] & 0xff;
            if (ch == '\0') {
                break;
            } else if ((ch >= 0x61 && ch <= 0x7a)
                    || (ch >= 0xe0 && ch <= 0xf6)
                    || (ch >= 0xf8 && ch <= 0xfe)) {
                b[i] = (byte) (ch - 0x20);
            }//from w  w  w. ja  v a  2  s . co  m
        }
    }
}

Related

  1. byteArrayBigEndian2Int(byte[] bs)
  2. byteArrayLittleEndian2Int(byte[] bs)
  3. bytesToAsciiMaybe(byte[] data)
  4. bytesToAsciiMaybe(byte[] data, int offset, int length)
  5. lowerToUpper(byte[] b)
  6. jisx0208ToString(byte[] b)
  7. jisx0208ToString(byte[] b, int offset, int len)
  8. toBase58(byte[] b)
  9. ushort2bytesBE(int val, byte[] b, int off)