code: public Packet putShort(int s, ByteOrder order) {
          var buffer = HEAP_BUFFER_POOL.take(Short.BYTES);
          var value = (short) s;
          var array = buffer.putShort(order == ByteOrder.LITTLE_ENDIAN ? Short.reverseBytes(value) : value).array();
          
          try {
              return enqueue(Arrays.copyOfRange(array, 0, Short.BYTES));
          } finally {
              HEAP_BUFFER_POOL.give(buffer);
          }
      }
docs: Writes a single {@code short} with the specified {@link ByteOrder} to this {@link Packet}'s payload.
  
  @param s     An {@code int} for ease-of-use, but internally down-casted to a {@code short}.
  @param order The internal byte order of the {@code short}.
  @return The {@link Packet} to allow for chained writes.