code: public final long getLong (int baseOffset) {
        long bytes = 0;
        if (order == ByteOrder.BIG_ENDIAN) {
            for (int i = 0; i < 8; i++) {
                bytes = bytes << 8;
                bytes = bytes | (byteArray.get(baseOffset + i) & 0xFF);
            }
        } else {
            for (int i = 7; i >= 0; i--) {
                bytes = bytes << 8;
                bytes = bytes | (byteArray.get(baseOffset + i) & 0xFF);
            }
        }
        return bytes;
      }
docs: Returns the long at the specified index.
  <p> The 8 bytes starting at the specified index are composed into a long according to the
  current byte order and returned. The position is not changed. </p>
  
  @param index the index, must not be negative and equal or less than {@code limit - 8}.
  @return the long at the specified index.
  @exception IndexOutOfBoundsException if {@code index} is invalid.