2018-09-02 13:36:49 +02:00
|
|
|
package it.cavallium.warppi;
|
2017-12-13 22:34:15 +01:00
|
|
|
|
|
|
|
import java.nio.ByteBuffer;
|
|
|
|
|
|
|
|
public class MmapByteBuffer {
|
|
|
|
private int fd;
|
|
|
|
private int address;
|
|
|
|
private int length;
|
|
|
|
private ByteBuffer buffer;
|
|
|
|
|
|
|
|
public MmapByteBuffer(int fd, int address, int length, ByteBuffer buffer) {
|
|
|
|
this.fd = fd;
|
|
|
|
this.address = address;
|
|
|
|
this.length = length;
|
|
|
|
this.buffer = buffer;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getFd() {
|
|
|
|
return fd;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getAddress() {
|
|
|
|
return address;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getLength() {
|
|
|
|
return length;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ByteBuffer getBuffer() {
|
|
|
|
return buffer;
|
|
|
|
}
|
|
|
|
}
|