Here you can find the source of bytesLittleToShort(byte[] data, int start)
public static short bytesLittleToShort(byte[] data, int start)
//package com.java2s; //License from project: Apache License public class Main { public static short bytesLittleToShort(byte[] data, int start) { short ret = 0; ret = (short) (data[start + 0] & 0x00ff); ret |= (0x00ff & data[start + 1]) << 8; return ret; }//from w ww . j a va2 s . c o m }