code: private static short shortBE(ByteBuffer buffer, int offset) {
          return buffer.order() == ByteOrder.BIG_ENDIAN ?
                  buffer.getShort(offset) : ByteBufUtil.swapShort(buffer.getShort(offset));
      }
docs: Reads a big-endian short integer from the buffer