ByteBuffer.putShort

Absolute <i>put</i> method for writing a short value&nbsp;&nbsp;<i>(optional operation)</i>.

<p> Writes two bytes containing the given short value, in the current byte order, into this buffer at the given index. </p>

@param index The index at which the bytes will be written

@param value The short value to be written

@return This buffer

@throws IndexOutOfBoundsException If <tt>index</tt> is negative or not smaller than the buffer's limit, minus one

@throws ReadOnlyBufferException If this buffer is read-only

  1. ByteBuffer putShort(short value)
  2. ByteBuffer putShort(int index, short value)
    class ByteBuffer
    abstract
    putShort
    (
    int index
    ,
    short value
    )

Meta