DexDataWriter extends BufferedOutputStream { public void writeLong(long value) throws IOException { writeInt((int)value); writeInt((int)(value >> 32)); } 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 testWriteLong() throws IOException { writer.writeLong(0x1122334455667788L); writer.writeLong(-0x1122334455667788L); expectData(0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x78, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE); }