code: public static void putVarInt(int v, OutputStream outputStream) throws IOException {
      byte[] bytes = new byte[varIntSize(v)];
      putVarInt(v, bytes, 0);
      outputStream.write(bytes);
    }
docs: Encodes an integer in a variable-length encoding, 7 bits per byte, and writes it to the given
  OutputStream.
  
  @param v the value to encode
  @param outputStream the OutputStream to write to