Android Byte Array to Short Convert getShort(byte[] bytes)

Here you can find the source of getShort(byte[] bytes)

Description

get Short

License

Open Source License

Declaration

public static short getShort(byte[] bytes) 

Method Source Code

//package com.java2s;

public class Main {
    public static short getShort(byte[] bytes) {
        return (short) ((0xff & bytes[0]) | (0xff00 & (bytes[1] << 8)));
    }//  w  ww. ja  va 2s.c  om
}

Related

  1. bytesToShort(byte[] bytes)
  2. getShort(byte[] b, int index)
  3. getShort(byte[] b, int index)
  4. getShort(byte[] buf, boolean bigEndian)
  5. getShort(byte[] buf, int pos, boolean bigEndian)
  6. toShort(byte[] b, int pos)
  7. toShort(byte[] data)
  8. toShort(byte[] data)
  9. makeShort(byte b1, byte b0)