Top Fields Constructors Methods
org.python.modules.jffi

pack-priv Class BoundedNativeMemory

extends Object
implements Memory, DirectMemory
Class Inheritance
All Implemented Interfaces
org.python.modules.jffi.DirectMemory, org.python.modules.jffi.Memory
Known Direct Subclasses
org.python.modules.jffi.AllocatedNativeMemory
Imports
com.kenai.jffi.Platform

Field Summary

Modifier and TypeField and Description
pack-priv final long
protected static final int
protected static final MemoryIO
protected static final int
pack-priv final BoundedNativeMemory
pack-priv final long

Constructor Summary

AccessConstructor and Description
pack-priv
BoundedNativeMemory(long address, int size)

private

Method Summary

Modifier and TypeMethod and Description
private final void
checkBounds(long off, long len)

public final boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public final void
get(long
The offset within the memory area to read the bytes.
offset
,
byte[]
The output byte array to place the data.
dst
,
int
The offset within the byte array to start copying.
off
,
int
The length of data to read.
len
)

Implements org.python.modules.jffi.Memory.get.

Reads an array of bytes from the memory area at the specified offset.

public final void
get(long
The offset within the memory area to read the shorts.
offset
,
short[]
The output array to place the data in.
dst
,
int
The offset within the array to start copying.
off
,
int
The number of shorts to read.
len
)

Implements org.python.modules.jffi.Memory.get.

Reads an array of shorts from the memory area at the specified offset.

public final void
get(long
The offset within the memory area to read the ints.
offset
,
int[]
The output array to place the data in.
dst
,
int
The offset within the array to start copying.
off
,
int
The number of ints to read.
len
)

Implements org.python.modules.jffi.Memory.get.

Reads an array of ints from the memory area at the specified offset.

public final void
get(long
The offset within the memory area to read the longs.
offset
,
long[]
The output array to place the data in.
dst
,
int
The offset within the array to start copying.
off
,
int
The number of longs to read.
len
)

Implements org.python.modules.jffi.Memory.get.

Reads an array of longs from the memory area at the specified offset.

public final void
get(long
The offset within the memory area to read the floats.
offset
,
float[]
The output array to place the data in.
dst
,
int
The offset within the array to start copying.
off
,
int
The number of floats to read.
len
)

Implements org.python.modules.jffi.Memory.get.

Reads an array of floats from the memory area at the specified offset.

public final void
get(long
The offset within the memory area to read the doubles.
offset
,
double[]
The output array to place the data in.
dst
,
int
The offset within the array to start copying.
off
,
int
The number of doubles to read.
len
)

Implements org.python.modules.jffi.Memory.get.

Reads an array of doubles from the memory area at the specified offset.

public final long
public final long
getAddress(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getAddress.

Reads a pointer value at the specified offset within the memory area.

public final byte
getByte(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getByte.

Reads an 8 bit integer value from the memory area.

public final double
getDouble(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getDouble.

Reads a double value from the memory area.

public final float
getFloat(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getFloat.

Reads a float value from the memory area.

public final int
getInt(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getInt.

Reads a 32 bit integer value from the memory area.

public final long
getLong(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getLong.

Reads a 64 bit integer value from the memory area.

public final DirectMemory
getMemory(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getMemory.

Reads a pointer value at the specified offset within the memory area, and wraps it in an abstract memory accessor.

public final long
getNativeLong(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getNativeLong.

Reads a native long integer value from the memory area.

public final short
getShort(long
The offset within the memory area to read the value.
offset
)

Implements org.python.modules.jffi.Memory.getShort.

Reads a 16 bit integer value from the memory area.

public final byte[]
getZeroTerminatedByteArray(long
The offset within the memory area of the start of the string.
offset
)

Implements org.python.modules.jffi.Memory.getZeroTerminatedByteArray.

Reads a zero terminated byte array (e.g. an ascii or utf-8 string)

public final int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public final int
indexOf(long
The offset within the memory area to start searching.
offset
,
byte
The value to search for.
value
)

Implements org.python.modules.jffi.Memory.indexOf.

Gets the first index within the memory area of a particular 8 bit value.

public final int
indexOf(long
The offset within the memory area to start searching.
offset
,
byte
The value to search for.
value
,
int maxlen)

Implements org.python.modules.jffi.Memory.indexOf.

Gets the first index within the memory area of a particular 8 bit value.

public final boolean
isDirect()

Implements org.python.modules.jffi.Memory.isDirect.

Checks if the memory area is a native memory pointer.

public final boolean
isNull()

Implements org.python.modules.jffi.Memory.isNull.

Checks if the memory area is NULL.

public final void
put(long
The offset within the memory area to start writing the bytes.
offset
,
byte[]
The byte array to write to the memory area.
src
,
int
The offset within the byte array to start copying.
off
,
int
The length of data to write.
len
)

Implements org.python.modules.jffi.Memory.put.

Writes an array of bytes to the memory area at the specified offset.

public final void
put(long
The offset within the memory area to start writing the shorts.
offset
,
short[]
The array to write to the memory area.
src
,
int
The offset within the array to start copying.
off
,
int
The number of shorts to write.
len
)

Implements org.python.modules.jffi.Memory.put.

Writes an array of shorts to the memory area at the specified offset.

public final void
put(long
The offset within the memory area to start writing the ints.
offset
,
int[]
The array to write to the memory area.
src
,
int
The offset within the array to start copying.
off
,
int
The number of ints to write.
len
)

Implements org.python.modules.jffi.Memory.put.

Writes an array of ints to the memory area at the specified offset.

public final void
put(long
The offset within the memory area to start writing the longs.
offset
,
long[]
The array to write to the memory area.
src
,
int
The offset within the array to start copying.
off
,
int
The number of longs to write.
len
)

Implements org.python.modules.jffi.Memory.put.

Writes an array of longs to the memory area at the specified offset.

public final void
put(long
The offset within the memory area to start writing the floats.
offset
,
float[]
The array to write to the memory area.
src
,
int
The offset within the array to start copying.
off
,
int
The number of floats to write.
len
)

Implements org.python.modules.jffi.Memory.put.

Writes an array of floats to the memory area at the specified offset.

public final void
put(long
The offset within the memory area to start writing the doubles.
offset
,
double[]
The array to write to the memory area.
src
,
int
The offset within the array to start copying.
off
,
int
The number of doubles to write.
len
)

Implements org.python.modules.jffi.Memory.put.

Writes an array of doubles to the memory area at the specified offset.

public final void
putAddress(long
The offset within the memory area to write the value.
offset
,
long
The pointer value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putAddress.

Writes a pointer value to the memory area at the specified offset.

public final void
putAddress(long
The offset within the memory area to write the value.
offset
,
Memory
The pointer value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putAddress.

Writes a pointer value to the memory area at the specified offset.

public final void
putByte(long
The offset within the memory area to write the value.
offset
,
byte
The 8 bit integer value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putByte.

Writes an 8 bit integer value to the memory area at the specified offset.

public final void
putDouble(long
The offset within the memory area to write the value.
offset
,
double
The 64 bit float value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putDouble.

Writes a 64 bit float value to the memory area at the specified offset.

public final void
putFloat(long
The offset within the memory area to write the value.
offset
,
float
The 32 bit float value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putFloat.

Writes a 32 bit float value to the memory area at the specified offset.

public final void
putInt(long
The offset within the memory area to write the value.
offset
,
int
The 32 bit integer value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putInt.

Writes a 32 bit integer value to the memory area at the specified offset.

public final void
putLong(long
The offset within the memory area to write the value.
offset
,
long
The 64 bit integer value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putLong.

Writes a 64 bit integer value to the memory area at the specified offset.

public final void
putNativeLong(long
The offset within the memory area to write the value.
offset
,
long
The native long integer value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putNativeLong.

Writes a native long integer value to the memory area at the specified offset.

public final void
putShort(long
The offset within the memory area to write the value.
offset
,
short
The 16 bit integer value to write to the memory location.
value
)

Implements org.python.modules.jffi.Memory.putShort.

Writes a 16 bit integer value to the memory area at the specified offset.

public void
putZeroTerminatedByteArray(long
The offset within the memory area of the start of the string.
offset
,
byte[]
The byte array to write to the memory.
bytes
,
int
The offset with the byte array to start copying.
off
,
int
The number of bytes of the byte array to write to the memory area. (not including zero byte)
len
)

Implements org.python.modules.jffi.Memory.putZeroTerminatedByteArray.

Writes a byte array to memory, and appends a zero terminator

public final void
setMemory(long
The offset within the memory area to start writing.
offset
,
long
The number of bytes to set to the value.
size
,
byte
The value to set each byte to.
value
)

Implements org.python.modules.jffi.Memory.setMemory.

Sets the contents of the memory area to the value.

public BoundedNativeMemory
slice(long
The offset within the existing memory area to start the new MemoryIO at.
offset
)

Implements org.python.modules.jffi.Memory.slice.

Creates a new MemoryIO pointing to a subset of the memory area of this MemoryIO.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

addressback to summary
pack-priv final long address
ADDRESS_SIZEback to summary
protected static final int ADDRESS_SIZE
IOback to summary
protected static final MemoryIO IO
LONG_SIZEback to summary
protected static final int LONG_SIZE
parentback to summary
pack-priv final BoundedNativeMemory parent
sizeback to summary
pack-priv final long size

Constructor Detail

BoundedNativeMemoryback to summary
pack-priv BoundedNativeMemory(long address, int size)
BoundedNativeMemoryback to summary
private BoundedNativeMemory(BoundedNativeMemory parent, long offset)

Method Detail

checkBoundsback to summary
private final void checkBounds(long off, long len)
equalsback to summary
public final boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override

getback to summary
public final void get(long offset, byte[] dst, int off, int len)

Implements org.python.modules.jffi.Memory.get.

Doc from org.python.modules.jffi.Memory.get.

Reads an array of bytes from the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to read the bytes.

dst:byte[]

The output byte array to place the data.

off:int

The offset within the byte array to start copying.

len:int

The length of data to read.

getback to summary
public final void get(long offset, short[] dst, int off, int len)

Implements org.python.modules.jffi.Memory.get.

Doc from org.python.modules.jffi.Memory.get.

Reads an array of shorts from the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to read the shorts.

dst:short[]

The output array to place the data in.

off:int

The offset within the array to start copying.

len:int

The number of shorts to read.

getback to summary
public final void get(long offset, int[] dst, int off, int len)

Implements org.python.modules.jffi.Memory.get.

Doc from org.python.modules.jffi.Memory.get.

Reads an array of ints from the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to read the ints.

dst:int[]

The output array to place the data in.

off:int

The offset within the array to start copying.

len:int

The number of ints to read.

getback to summary
public final void get(long offset, long[] dst, int off, int len)

Implements org.python.modules.jffi.Memory.get.

Doc from org.python.modules.jffi.Memory.get.

Reads an array of longs from the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to read the longs.

dst:long[]

The output array to place the data in.

off:int

The offset within the array to start copying.

len:int

The number of longs to read.

getback to summary
public final void get(long offset, float[] dst, int off, int len)

Implements org.python.modules.jffi.Memory.get.

Doc from org.python.modules.jffi.Memory.get.

Reads an array of floats from the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to read the floats.

dst:float[]

The output array to place the data in.

off:int

The offset within the array to start copying.

len:int

The number of floats to read.

getback to summary
public final void get(long offset, double[] dst, int off, int len)

Implements org.python.modules.jffi.Memory.get.

Doc from org.python.modules.jffi.Memory.get.

Reads an array of doubles from the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to read the doubles.

dst:double[]

The output array to place the data in.

off:int

The offset within the array to start copying.

len:int

The number of doubles to read.

getAddressback to summary
public final long getAddress()

Implements org.python.modules.jffi.DirectMemory.getAddress.

getAddressback to summary
public final long getAddress(long offset)

Implements org.python.modules.jffi.Memory.getAddress.

Doc from org.python.modules.jffi.Memory.getAddress.

Reads a pointer value at the specified offset within the memory area.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:long

A long value that represents the address.

getByteback to summary
public final byte getByte(long offset)

Implements org.python.modules.jffi.Memory.getByte.

Doc from org.python.modules.jffi.Memory.getByte.

Reads an 8 bit integer value from the memory area.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:byte

The 8 bit integer value read from offset

getDoubleback to summary
public final double getDouble(long offset)

Implements org.python.modules.jffi.Memory.getDouble.

Doc from org.python.modules.jffi.Memory.getDouble.

Reads a double value from the memory area.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:double

The double value read from offset

getFloatback to summary
public final float getFloat(long offset)

Implements org.python.modules.jffi.Memory.getFloat.

Doc from org.python.modules.jffi.Memory.getFloat.

Reads a float value from the memory area.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:float

The float value read from offset

getIntback to summary
public final int getInt(long offset)

Implements org.python.modules.jffi.Memory.getInt.

Doc from org.python.modules.jffi.Memory.getInt.

Reads a 32 bit integer value from the memory area.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:int

The 32 bit integer value read from offset

getLongback to summary
public final long getLong(long offset)

Implements org.python.modules.jffi.Memory.getLong.

Doc from org.python.modules.jffi.Memory.getLong.

Reads a 64 bit integer value from the memory area.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:long

The 64 bit integer value read from offset

getMemoryback to summary
public final DirectMemory getMemory(long offset)

Implements org.python.modules.jffi.Memory.getMemory.

Doc from org.python.modules.jffi.Memory.getMemory.

Reads a pointer value at the specified offset within the memory area, and wraps it in an abstract memory accessor.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:DirectMemory

A DirectMemory accessor that can be used to access the memory pointed to by the address.

getNativeLongback to summary
public final long getNativeLong(long offset)

Implements org.python.modules.jffi.Memory.getNativeLong.

Doc from org.python.modules.jffi.Memory.getNativeLong.

Reads a native long integer value from the memory area.

A native long is 32bits on either ILP32 or LLP64 architectures, and 64 bits on an LP64 architecture.

This means that it will always read a 32bit value on Windows, but on Unix systems such as MacOS or Linux, it will read a 32bit value on 32bit systems, and a 64bit value on 64bit systems.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:long

The native long value read from offset

getShortback to summary
public final short getShort(long offset)

Implements org.python.modules.jffi.Memory.getShort.

Doc from org.python.modules.jffi.Memory.getShort.

Reads a 16 bit integer value from the memory area.

Parameters
offset:long

The offset within the memory area to read the value.

Returns:short

The 16 bit integer value read from offset

getZeroTerminatedByteArrayback to summary
public final byte[] getZeroTerminatedByteArray(long offset)

Implements org.python.modules.jffi.Memory.getZeroTerminatedByteArray.

Doc from org.python.modules.jffi.Memory.getZeroTerminatedByteArray.

Reads a zero terminated byte array (e.g. an ascii or utf-8 string)

Parameters
offset:long

The offset within the memory area of the start of the string.

Returns:byte[]

A byte array containing a copy of the data.

hashCodeback to summary
public final int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override

indexOfback to summary
public final int indexOf(long offset, byte value)

Implements org.python.modules.jffi.Memory.indexOf.

Doc from org.python.modules.jffi.Memory.indexOf.

Gets the first index within the memory area of a particular 8 bit value.

Parameters
offset:long

The offset within the memory area to start searching.

value:byte

The value to search for.

Returns:int

The index of the value, relative to offset.

indexOfback to summary
public final int indexOf(long offset, byte value, int maxlen)

Implements org.python.modules.jffi.Memory.indexOf.

Doc from org.python.modules.jffi.Memory.indexOf.

Gets the first index within the memory area of a particular 8 bit value.

Parameters
offset:long

The offset within the memory area to start searching.

value:byte

The value to search for.

Returns:int

The index of the value, relative to offset.

isDirectback to summary
public final boolean isDirect()

Implements org.python.modules.jffi.Memory.isDirect.

Doc from org.python.modules.jffi.Memory.isDirect.

Checks if the memory area is a native memory pointer.

Returns:boolean

true if the memory area is a native pointer.

isNullback to summary
public final boolean isNull()

Implements org.python.modules.jffi.Memory.isNull.

Doc from org.python.modules.jffi.Memory.isNull.

Checks if the memory area is NULL.

Returns:boolean

true if the memory area is invalid.

putback to summary
public final void put(long offset, byte[] src, int off, int len)

Implements org.python.modules.jffi.Memory.put.

Doc from org.python.modules.jffi.Memory.put.

Writes an array of bytes to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to start writing the bytes.

src:byte[]

The byte array to write to the memory area.

off:int

The offset within the byte array to start copying.

len:int

The length of data to write.

putback to summary
public final void put(long offset, short[] src, int off, int len)

Implements org.python.modules.jffi.Memory.put.

Doc from org.python.modules.jffi.Memory.put.

Writes an array of shorts to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to start writing the shorts.

src:short[]

The array to write to the memory area.

off:int

The offset within the array to start copying.

len:int

The number of shorts to write.

putback to summary
public final void put(long offset, int[] src, int off, int len)

Implements org.python.modules.jffi.Memory.put.

Doc from org.python.modules.jffi.Memory.put.

Writes an array of ints to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to start writing the ints.

src:int[]

The array to write to the memory area.

off:int

The offset within the array to start copying.

len:int

The number of ints to write.

putback to summary
public final void put(long offset, long[] src, int off, int len)

Implements org.python.modules.jffi.Memory.put.

Doc from org.python.modules.jffi.Memory.put.

Writes an array of longs to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to start writing the longs.

src:long[]

The array to write to the memory area.

off:int

The offset within the array to start copying.

len:int

The number of longs to write.

putback to summary
public final void put(long offset, float[] src, int off, int len)

Implements org.python.modules.jffi.Memory.put.

Doc from org.python.modules.jffi.Memory.put.

Writes an array of floats to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to start writing the floats.

src:float[]

The array to write to the memory area.

off:int

The offset within the array to start copying.

len:int

The number of floats to write.

putback to summary
public final void put(long offset, double[] src, int off, int len)

Implements org.python.modules.jffi.Memory.put.

Doc from org.python.modules.jffi.Memory.put.

Writes an array of doubles to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to start writing the doubles.

src:double[]

The array to write to the memory area.

off:int

The offset within the array to start copying.

len:int

The number of doubles to write.

putAddressback to summary
public final void putAddress(long offset, long value)

Implements org.python.modules.jffi.Memory.putAddress.

Doc from org.python.modules.jffi.Memory.putAddress.

Writes a pointer value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:long

The pointer value to write to the memory location.

putAddressback to summary
public final void putAddress(long offset, Memory value)

Implements org.python.modules.jffi.Memory.putAddress.

Doc from org.python.modules.jffi.Memory.putAddress.

Writes a pointer value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:Memory

The pointer value to write to the memory location.

putByteback to summary
public final void putByte(long offset, byte value)

Implements org.python.modules.jffi.Memory.putByte.

Doc from org.python.modules.jffi.Memory.putByte.

Writes an 8 bit integer value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:byte

The 8 bit integer value to write to the memory location.

putDoubleback to summary
public final void putDouble(long offset, double value)

Implements org.python.modules.jffi.Memory.putDouble.

Doc from org.python.modules.jffi.Memory.putDouble.

Writes a 64 bit float value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:double

The 64 bit float value to write to the memory location.

putFloatback to summary
public final void putFloat(long offset, float value)

Implements org.python.modules.jffi.Memory.putFloat.

Doc from org.python.modules.jffi.Memory.putFloat.

Writes a 32 bit float value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:float

The 32 bit float value to write to the memory location.

putIntback to summary
public final void putInt(long offset, int value)

Implements org.python.modules.jffi.Memory.putInt.

Doc from org.python.modules.jffi.Memory.putInt.

Writes a 32 bit integer value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:int

The 32 bit integer value to write to the memory location.

putLongback to summary
public final void putLong(long offset, long value)

Implements org.python.modules.jffi.Memory.putLong.

Doc from org.python.modules.jffi.Memory.putLong.

Writes a 64 bit integer value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:long

The 64 bit integer value to write to the memory location.

putNativeLongback to summary
public final void putNativeLong(long offset, long value)

Implements org.python.modules.jffi.Memory.putNativeLong.

Doc from org.python.modules.jffi.Memory.putNativeLong.

Writes a native long integer value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:long

The native long integer value to write to the memory location.

putShortback to summary
public final void putShort(long offset, short value)

Implements org.python.modules.jffi.Memory.putShort.

Doc from org.python.modules.jffi.Memory.putShort.

Writes a 16 bit integer value to the memory area at the specified offset.

Parameters
offset:long

The offset within the memory area to write the value.

value:short

The 16 bit integer value to write to the memory location.

putZeroTerminatedByteArrayback to summary
public void putZeroTerminatedByteArray(long offset, byte[] bytes, int off, int len)

Implements org.python.modules.jffi.Memory.putZeroTerminatedByteArray.

Doc from org.python.modules.jffi.Memory.putZeroTerminatedByteArray.

Writes a byte array to memory, and appends a zero terminator

Parameters
offset:long

The offset within the memory area of the start of the string.

bytes:byte[]

The byte array to write to the memory.

off:int

The offset with the byte array to start copying.

len:int

The number of bytes of the byte array to write to the memory area. (not including zero byte)

setMemoryback to summary
public final void setMemory(long offset, long size, byte value)

Implements org.python.modules.jffi.Memory.setMemory.

Doc from org.python.modules.jffi.Memory.setMemory.

Sets the contents of the memory area to the value.

Parameters
offset:long

The offset within the memory area to start writing.

size:long

The number of bytes to set to the value.

value:byte

The value to set each byte to.

sliceback to summary
public BoundedNativeMemory slice(long offset)

Implements org.python.modules.jffi.Memory.slice.

Doc from org.python.modules.jffi.Memory.slice.

Creates a new MemoryIO pointing to a subset of the memory area of this MemoryIO.

Parameters
offset:long

The offset within the existing memory area to start the new MemoryIO at.

Returns:BoundedNativeMemory

A MemoryIO instance.