code: public ByteBuffer putShort (short value) {
        int newPosition = position + 2;
  //if (newPosition > limit) {
  //throw new BufferOverflowException();
  //}
        putShort(position, value);
        position = newPosition;
        return this;
      }
docs: Writes the given short to the current position and increases the position by 2.
  <p> The short is converted to bytes using the current byte order. </p>
  
  @param value the short to write.
  @return this buffer.
  @exception BufferOverflowException if position is greater than {@code limit - 2}.
  @exception ReadOnlyBufferException if no changes may be made to the contents of this buffer.