@Test(expected = MemoryAccessException.class) public void writeBubblesUpRawWriterException() { rawWriter = (p, o, b) -> { throw new MemoryAccessException("fail"); }; writer.write(process, 12312, new byte[]{123}); }
@Override public void write(NativeProcess process, int offset, byte[] values) throws MemoryAccessException { if (values.length < 1) { throw new IllegalArgumentException("Cannot write empty array!"); } writer.write(process, offset, values); }
MemoryWriterImpl implements MemoryWriter { @Override public void write(NativeProcess process, int offset, byte[] values) throws MemoryAccessException { if (values.length < 1) { throw new IllegalArgumentException("Cannot write empty array!"); } writer.write(process, offset, values); } }
MemoryWriterImpl implements MemoryWriter { @Override public void write(NativeProcess process, int offset, byte[] values) throws MemoryAccessException { if (values.length < 1) { throw new IllegalArgumentException("Cannot write empty array!"); } writer.write(process, offset, values); } MemoryWriterImpl(RawMemoryWriter writer); }
MemoryWriterImpl implements MemoryWriter { @Override public void write(NativeProcess process, int offset, byte[] values) throws MemoryAccessException { if (values.length < 1) { throw new IllegalArgumentException("Cannot write empty array!"); } writer.write(process, offset, values); } MemoryWriterImpl(RawMemoryWriter writer); @Override void writeBoolean(NativeProcess process, int offset, boolean value); @Override void writeByte(NativeProcess process, int offset, byte value); @Override void writeCharUTF8(NativeProcess process, int offset, char value); @Override void writeCharUTF16LE(NativeProcess process, int offset, char value); @Override void writeShort(NativeProcess process, int offset, short value); @Override void writeInt(NativeProcess process, int offset, int value); @Override void writeFloat(NativeProcess process, int offset, float value); @Override void writeLong(NativeProcess process, int offset, long value); @Override void writeDouble(NativeProcess process, int offset, double value); @Override void writeStringUTF8(NativeProcess process, int offset, String value); @Override void writeStringUTF16LE(NativeProcess process, int offset, String value); @Override void write(NativeProcess process, int offset, byte[] values); }
MemoryWriterImpl implements MemoryWriter { @Override public void write(NativeProcess process, int offset, byte[] values) throws MemoryAccessException { if (values.length < 1) { throw new IllegalArgumentException("Cannot write empty array!"); } writer.write(process, offset, values); } MemoryWriterImpl(RawMemoryWriter writer); @Override void writeBoolean(NativeProcess process, int offset, boolean value); @Override void writeByte(NativeProcess process, int offset, byte value); @Override void writeCharUTF8(NativeProcess process, int offset, char value); @Override void writeCharUTF16LE(NativeProcess process, int offset, char value); @Override void writeShort(NativeProcess process, int offset, short value); @Override void writeInt(NativeProcess process, int offset, int value); @Override void writeFloat(NativeProcess process, int offset, float value); @Override void writeLong(NativeProcess process, int offset, long value); @Override void writeDouble(NativeProcess process, int offset, double value); @Override void writeStringUTF8(NativeProcess process, int offset, String value); @Override void writeStringUTF16LE(NativeProcess process, int offset, String value); @Override void write(NativeProcess process, int offset, byte[] values);  }