WarpPI/core/src/main/java/it/cavallium/warppi/MmapByteBuffer.java

33 lines
594 B
Java
Raw Normal View History

package it.cavallium.warppi;
2017-12-13 22:34:15 +01:00
import java.nio.ByteBuffer;
public class MmapByteBuffer {
2018-05-12 21:18:29 +02:00
private final int fd;
private final int address;
private final int length;
private final ByteBuffer buffer;
2017-12-13 22:34:15 +01:00
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;
}
2018-05-12 21:18:29 +02:00
2017-12-13 22:34:15 +01:00
public int getAddress() {
return address;
}
2018-05-12 21:18:29 +02:00
2017-12-13 22:34:15 +01:00
public int getLength() {
return length;
}
2018-05-12 21:18:29 +02:00
2017-12-13 22:34:15 +01:00
public ByteBuffer getBuffer() {
return buffer;
}
}