Android Little Endian to Short Convert littleEndToShort(byte[] array, int start)

Here you can find the source of littleEndToShort(byte[] array, int start)

Description

\copydoc littleEndToLong()

Declaration

public static short littleEndToShort(byte[] array, int start) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from  ww w  .jav  a2s .co m
     * \copydoc littleEndToLong()
     **/
    public static short littleEndToShort(byte[] array, int start) {
        return (short) ((array[start + 1] << 8) | (array[start] & 0xFF));
    }
}