private static short[] toShorts(final byte[] bytes, final int offset, final int length, final ByteOrder byteOrder) {
        final short[] result = Allocator.shortArray(length / 2);
        for (int i = 0; i < result.length; i++) {
            result[i] = toShort(bytes, offset + 2 * i, byteOrder);
        }
        return result;
    }
Interprets the content of a specified bytes array to create an instance of the RationalNumber class.

@param bytes        a valid array dimensioned to at least 8.
@param byteOrder    the byte order for integer conversion
@param unsignedType indicates whether the extracted value is an unsigned type.
@return a valid instance
src/main/java/org/apache/commons/imaging/common/ByteConversions.java