DexDataWriter extends BufferedOutputStream { public static void writeInt(OutputStream out, int value) throws IOException { out.write(value); out.write(value >> 8); out.write(value >> 16); out.write(value >> 24); } DexDataWriter(@Nonnull OutputStream output, int filePosition);  DexDataWriter(@Nonnull OutputStream output, int filePosition, int bufferSize); @Override void write(int b); @Override void write(byte[] b); @Override void write(byte[] b, int off, int len); void writeLong(long value); static void writeInt(OutputStream out, int value); void writeInt(int value); void writeShort(int value); void writeUshort(int value); void writeUbyte(int value); static void writeUleb128(OutputStream out, int value); void writeUleb128(int value); static void writeSleb128(OutputStream out, int value); void writeSleb128(int value); void writeEncodedValueHeader(int valueType, int valueArg); void writeEncodedInt(int valueType, int value); void writeEncodedLong(int valueType, long value); void writeEncodedUint(int valueType, int value); void writeEncodedFloat(int valueType, float value); void writeEncodedDouble(int valueType, double value); void writeString(String string); void align(); int getPosition();  }
@Test public void testWriteInt() throws IOException { writer.writeInt(0x11223344); writer.writeInt(-0x11223344); expectData(0x44, 0x33, 0x22, 0x11, 0xBC, 0xCC, 0xDD, 0xEE); }