Writes the 16 low-order bits of
v
to the stream. The 16 high-order bits of
v
are ignored. If the stream uses network byte order, the bytes written, in order, will be:
(byte)((v >> 8) & 0xff) (byte)(v & 0xff)
Otherwise, the bytes written will be:
(byte)(v & 0xff) (byte)((v >> 8) & 0xff)
If the bit offset within the stream is non-zero, the remainder of the current byte is padded with 0s and written out first. The bit offset will be 0 after the write.
@param v an int
containing the short value to bewritten.
@exception IOException if an I/O error occurs.