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