Android Byte Array to Short Convert byteArray2Short(byte[] b)

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

Description

byte Array Short

Declaration

public static final int byteArray2Short(byte[] b) 

Method Source Code

//package com.java2s;

public class Main {
    public static final int byteArray2Short(byte[] b) {
        return (b[0] << 8) + (b[1] & 0xFF);
    }// w w w.  jav  a2  s  .  c  o m
}

Related

  1. bytesToShort(byte[] b)
  2. bytesToShort(byte[] b)
  3. toShort(byte[] in)
  4. byte2Short(byte bin)
  5. byteArrayToShort(byte[] b, int offset)
  6. bytesBE2shorts(byte[] b)
  7. bytesBE2sshort(byte[] b, int off)
  8. bytesBE2sshorts(byte[] b)