Here you can find the source of bigEndToShort(byte[] array, int start)
public static short bigEndToShort(byte[] array, int start)
//package com.java2s; public class Main { /**//from w ww. j a v a 2 s. c om * Converts a byte array into short from big-endian format. * \param array The byte array to convert from. * \param start The starting point, int the array \a a, where the * conversion should start. * \returns The number after the conversion. **/ public static short bigEndToShort(byte[] array, int start) { return (short) ((array[start + 0] << 8) | (array[start + 1] & 0xFF)); } }