Java Char Create toChar(byte[] b, int off)

Here you can find the source of toChar(byte[] b, int off)

Description

to Char

License

Apache License

Declaration

public static char toChar(byte[] b, int off) 

Method Source Code

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

public class Main {
    public static char toChar(byte[] b) {
        return toChar(b, 0);
    }/*from  w  w  w  .j  av a 2  s  . c  om*/

    public static char toChar(byte[] b, int off) {
        return (char) (((b[off + 1] & 0xFF) << 0) + ((b[off + 0] & 0xFF) << 8));
    }
}

Related

  1. toChar(byte b)
  2. toChar(byte value)
  3. toChar(byte[] buffer)
  4. toChar(byte[] buffer)
  5. toChar(byte[] byteArray)
  6. toChar(byte[] bytes)