Java Byte Array to Short byte2short(byte[] value, int offset)

Here you can find the source of byte2short(byte[] value, int offset)

Description

byteshort

License

Apache License

Declaration

public static short byte2short(byte[] value, int offset) 

Method Source Code

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

public class Main {
    public static short byte2short(byte[] value, int offset) {
        long result = (((long) (value[0 + offset]) & 0xFF) << 8) | ((long) (value[1 + offset]) & 0xFF);
        return (short) (result & 0xFFFFL);
    }//w ww.  j  a  va 2 s . com
}

Related

  1. arr2short(byte[] arr)
  2. bufferToShort(byte[] ioBuffer)
  3. byte2short(byte[] ba)
  4. byte2short(byte[] data)
  5. byte2Short(int loc, byte b[])
  6. bytes2short(byte[] b)
  7. bytes2Short(byte[] bytes)
  8. bytes2short(byte[] bytes, int offset, boolean bigEndian)