public class Memory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected long |
peer |
Modifier | Constructor and Description |
---|---|
protected |
Memory(long bytes) |
Modifier and Type | Method and Description |
---|---|
static Memory |
allocate(long bytes) |
java.nio.ByteBuffer[] |
asByteBuffers() |
Memory |
copy(long newSize) |
boolean |
equals(java.lang.Object o) |
void |
free() |
byte |
getByte(long offset) |
void |
getBytes(long memoryOffset,
byte[] buffer,
int bufferOffset,
int count)
Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset
|
int |
getInt(long offset) |
long |
getLong(long offset) |
void |
put(long trgOffset,
Memory memory,
long srcOffset,
long size) |
void |
setByte(long offset,
byte b) |
void |
setBytes(long memoryOffset,
byte[] buffer,
int bufferOffset,
int count)
Transfers count bytes from buffer to Memory
|
void |
setBytes(long memoryOffset,
java.nio.ByteBuffer buffer) |
void |
setInt(long offset,
int l) |
void |
setLong(long offset,
long l) |
void |
setMemory(long offset,
long bytes,
byte b) |
long |
size() |
public static Memory allocate(long bytes)
public void setByte(long offset, byte b)
public void setMemory(long offset, long bytes, byte b)
public void setLong(long offset, long l)
public void setInt(long offset, int l)
public void setBytes(long memoryOffset, java.nio.ByteBuffer buffer)
public void setBytes(long memoryOffset, byte[] buffer, int bufferOffset, int count)
memoryOffset
- start offset in the memorybuffer
- the data bufferbufferOffset
- start offset of the buffercount
- number of bytes to transferpublic byte getByte(long offset)
public long getLong(long offset)
public int getInt(long offset)
public void getBytes(long memoryOffset, byte[] buffer, int bufferOffset, int count)
memoryOffset
- start offset in the memorybuffer
- the data bufferbufferOffset
- start offset of the buffercount
- number of bytes to transferpublic void put(long trgOffset, Memory memory, long srcOffset, long size)
public Memory copy(long newSize)
public void free()
public long size()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.nio.ByteBuffer[] asByteBuffers()
Copyright © 2014 The Apache Software Foundation