code: public static void writeShort(OutputStream out, short v) throws IOException {
      out.write((byte) (0xff & (v >> 8)));
      out.write((byte) (0xff & v));
    }
docs: Writes a specific short value (2 bytes) to the output stream.
  
  @param out output stream
  @param v short value to write