- java.lang.Object
-
- de.ibapl.jnhw.common.memory.JnhwMemoryAccessor
-
- All Implemented Interfaces:
MemoryAccessor
public class JnhwMemoryAccessor extends Object implements MemoryAccessor
- Author:
- aploese
-
-
Constructor Summary
Constructors Constructor Description JnhwMemoryAccessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longallocateMemory(AbstractNativeMemory mem, long sizeInBytes)voidcopyMemory32(byte[] src, int srcPos, OpaqueMemory32 destMem, int destPos, int length)voidcopyMemory32(OpaqueMemory32 srcMem, int srcPos, byte[] dest, int destPos, int length)voidcopyMemory64(byte[] src, int srcPos, OpaqueMemory64 destMem, long destPos, int length)voidcopyMemory64(OpaqueMemory64 srcMem, long srcPos, byte[] dest, int destPos, int length)StringgetUnicodeString(OpaqueMemory32 mem, long offset, int start, int len)intgetUnicodeStringLength(String s)underlying datatype is 16 bit wide, so multiply this by 2 for bytes needed!StringgetUTF_8String(OpaqueMemory32 mem, long offset)this is a NULL terminated string, so we have to fetch the complete string.intgetUTF_8StringLength(String s)In order to calculate the needed size in bytes, add a 1 for NULL termination!shortint16_t(OpaqueMemory32 mem, long offset)voidint16_t(OpaqueMemory32 mem, long offset, short value)Stringint16_t_AsHex(OpaqueMemory32 mem, long offset)Stringint16_t_nativeToString(OpaqueMemory32 mem, long offset)intint32_t(OpaqueMemory32 mem, long offset)voidint32_t(OpaqueMemory32 mem, long offset, int value)Stringint32_t_AsHex(OpaqueMemory32 mem, long offset)Stringint32_t_nativeToString(OpaqueMemory32 mem, long offset)longint64_t(OpaqueMemory32 mem, long offset)voidint64_t(OpaqueMemory32 mem, long offset, long value)Stringint64_t_AsHex(OpaqueMemory32 mem, long offset)Stringint64_t_nativeToString(OpaqueMemory32 mem, long offset)byteint8_t(OpaqueMemory32 mem, long offset)voidint8_t(OpaqueMemory32 mem, long offset, byte value)byteint8_t(OpaqueMemory64 mem, long offset)voidint8_t(OpaqueMemory64 mem, long offset, byte value)Stringint8_t_AsHex(OpaqueMemory32 mem, long offset)Stringint8_t_nativeToString(OpaqueMemory32 mem, long offset)longintptr_t(OpaqueMemory32 mem, long offset)voidintptr_t(OpaqueMemory32 mem, long offset, long dest)Stringintptr_t_AsHex(OpaqueMemory32 mem, long offset)longintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index)voidintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index, long dest)voidsetMemory32(OpaqueMemory32 mem, byte value)voidsetMemory64(OpaqueMemory64 mem, byte value)voidsetUnicodeString(String s, int srcStart, OpaqueMemory32 mem, long offset, int destStart, int len)voidsetUTF_8String(String s, int srcStart, OpaqueMemory32 mem, long offset, int len)longsigned_long(OpaqueMemory32 mem, long offset)access the native long (signed long) datatype.voidsigned_long(OpaqueMemory32 mem, long offset, long value)access the native long (signed long) datatype.longsigned_long_AtIndex(OpaqueMemory32 mem, long offset, int index)access the ith native unsigned long datatype.voidsigned_long_AtIndex(OpaqueMemory32 mem, long offset, int index, long value)access the ith native unsigned long datatype.shortuint16_t(OpaqueMemory32 mem, long offset)voiduint16_t(OpaqueMemory32 mem, long offset, short value)Stringuint16_t_AsHex(OpaqueMemory32 mem, long offset)intuint16_t_AsInt(OpaqueMemory32 mem, long offset)voiduint16_t_FromInt(OpaqueMemory32 mem, long offset, int value)Stringuint16_t_nativeToString(OpaqueMemory32 mem, long offset)intuint32_t(OpaqueMemory32 mem, long offset)voiduint32_t(OpaqueMemory32 mem, long offset, int value)Stringuint32_t_AsHex(OpaqueMemory32 mem, long offset)longuint32_t_AsLong(OpaqueMemory32 mem, long offset)voiduint32_t_FromLong(OpaqueMemory32 mem, long offset, long value)Stringuint32_t_nativeToString(OpaqueMemory32 mem, long offset)longuint64_t(OpaqueMemory32 mem, long offset)voiduint64_t(OpaqueMemory32 mem, long offset, long value)Stringuint64_t_AsHex(OpaqueMemory32 mem, long offset)Stringuint64_t_nativeToString(OpaqueMemory32 mem, long offset)byteuint8_t(OpaqueMemory32 mem, long offset)voiduint8_t(OpaqueMemory32 mem, long offset, byte value)Stringuint8_t_AsHex(OpaqueMemory32 mem, long offset)shortuint8_t_AsShort(OpaqueMemory32 mem, long offset)voiduint8_t_FromShort(OpaqueMemory32 mem, long offset, short value)Stringuint8_t_nativeToString(OpaqueMemory32 mem, long offset)longuintptr_t(OpaqueMemory32 mem, long offset)voiduintptr_t(OpaqueMemory32 mem, long offset, long dest)voiduintptr_t(OpaqueMemory32 mem, long offset, NativeAddressHolder dest)voiduintptr_t(OpaqueMemory32 mem, long offset, NativeFunctionPointer dest)voiduintptr_t(OpaqueMemory32 mem, long offset, OpaqueMemory32 destMem)voiduintptr_t(OpaqueMemory32 mem, long offset, OpaqueMemory32 destMem, long destOffset)voiduintptr_t(OpaqueMemory32 mem, long offset, ByteBuffer destMem)Stringuintptr_t_AsHex(OpaqueMemory32 mem, long offset)NativeAddressHolderuintptr_t_AsNativeAddressHolder(OpaqueMemory32 mem, long offset)longuintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index)voiduintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index, long dest)voiduintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index, NativeAddressHolder dest)voiduintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index, OpaqueMemory32 destAddress)NativeAddressHolderuintptr_t_AtIndex_AsNativeAddressHolder(OpaqueMemory32 mem, long offset, int index)longunsigned_long(OpaqueMemory32 mem, long offset)access the native unsigned long datatype.voidunsigned_long(OpaqueMemory32 mem, long offset, long value)access the native unsigned long datatype.longunsigned_long_AtIndex(OpaqueMemory32 mem, long offset, int index)access the ith native unsigned long datatype.voidunsigned_long_AtIndex(OpaqueMemory32 mem, long offset, int index, long value)access the ith native unsigned long datatype.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.ibapl.jnhw.common.memory.MemoryAccessor
getSignedIntOf, getSignedIntOf_AsHex, getSignedIntOf_nativeToString, getSignedLongOf, getSignedLongOf_AsHex, getSignedLongOf_nativeToString, getUnsignedIntOf, getUnsignedIntOf_AsHex, getUnsignedIntOf_nativeToString, getUnsignedLongOf, getUnsignedLongOf_AsHex, getUnsignedLongOf_nativeToString, setSignedIntOf, setSignedLongOf, setUnsignedIntOf, setUnsignedLongOf
-
-
-
-
Method Detail
-
setMemory32
public void setMemory32(OpaqueMemory32 mem, byte value)
- Specified by:
setMemory32in interfaceMemoryAccessor
-
setMemory64
public void setMemory64(OpaqueMemory64 mem, byte value)
- Specified by:
setMemory64in interfaceMemoryAccessor
-
copyMemory32
public void copyMemory32(byte[] src, int srcPos, OpaqueMemory32 destMem, int destPos, int length)- Specified by:
copyMemory32in interfaceMemoryAccessor
-
copyMemory64
public void copyMemory64(byte[] src, int srcPos, OpaqueMemory64 destMem, long destPos, int length)- Specified by:
copyMemory64in interfaceMemoryAccessor
-
copyMemory32
public void copyMemory32(OpaqueMemory32 srcMem, int srcPos, byte[] dest, int destPos, int length)
- Specified by:
copyMemory32in interfaceMemoryAccessor
-
copyMemory64
public void copyMemory64(OpaqueMemory64 srcMem, long srcPos, byte[] dest, int destPos, int length)
- Specified by:
copyMemory64in interfaceMemoryAccessor
-
int8_t
public byte int8_t(OpaqueMemory32 mem, long offset)
- Specified by:
int8_tin interfaceMemoryAccessor
-
int8_t
public void int8_t(OpaqueMemory32 mem, long offset, byte value)
- Specified by:
int8_tin interfaceMemoryAccessor
-
int8_t
public byte int8_t(OpaqueMemory64 mem, long offset)
- Specified by:
int8_tin interfaceMemoryAccessor
-
int8_t
public void int8_t(OpaqueMemory64 mem, long offset, byte value)
- Specified by:
int8_tin interfaceMemoryAccessor
-
int8_t_AsHex
public String int8_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
int8_t_AsHexin interfaceMemoryAccessor
-
int8_t_nativeToString
public String int8_t_nativeToString(OpaqueMemory32 mem, long offset)
- Specified by:
int8_t_nativeToStringin interfaceMemoryAccessor
-
int16_t
public short int16_t(OpaqueMemory32 mem, long offset)
- Specified by:
int16_tin interfaceMemoryAccessor
-
int16_t
public void int16_t(OpaqueMemory32 mem, long offset, short value)
- Specified by:
int16_tin interfaceMemoryAccessor
-
int16_t_AsHex
public String int16_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
int16_t_AsHexin interfaceMemoryAccessor
-
int16_t_nativeToString
public String int16_t_nativeToString(OpaqueMemory32 mem, long offset)
- Specified by:
int16_t_nativeToStringin interfaceMemoryAccessor
-
int32_t
public int int32_t(OpaqueMemory32 mem, long offset)
- Specified by:
int32_tin interfaceMemoryAccessor
-
int32_t
public void int32_t(OpaqueMemory32 mem, long offset, int value)
- Specified by:
int32_tin interfaceMemoryAccessor
-
int32_t_AsHex
public String int32_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
int32_t_AsHexin interfaceMemoryAccessor
-
int32_t_nativeToString
public String int32_t_nativeToString(OpaqueMemory32 mem, long offset)
- Specified by:
int32_t_nativeToStringin interfaceMemoryAccessor
-
int64_t
public long int64_t(OpaqueMemory32 mem, long offset)
- Specified by:
int64_tin interfaceMemoryAccessor
-
int64_t
public void int64_t(OpaqueMemory32 mem, long offset, long value)
- Specified by:
int64_tin interfaceMemoryAccessor
-
int64_t_AsHex
public String int64_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
int64_t_AsHexin interfaceMemoryAccessor
-
int64_t_nativeToString
public String int64_t_nativeToString(OpaqueMemory32 mem, long offset)
- Specified by:
int64_t_nativeToStringin interfaceMemoryAccessor
-
uint8_t
public byte uint8_t(OpaqueMemory32 mem, long offset)
- Specified by:
uint8_tin interfaceMemoryAccessor
-
uint8_t_AsShort
public short uint8_t_AsShort(OpaqueMemory32 mem, long offset)
- Specified by:
uint8_t_AsShortin interfaceMemoryAccessor
-
uint8_t
public void uint8_t(OpaqueMemory32 mem, long offset, byte value)
- Specified by:
uint8_tin interfaceMemoryAccessor
-
uint8_t_FromShort
public void uint8_t_FromShort(OpaqueMemory32 mem, long offset, short value)
- Specified by:
uint8_t_FromShortin interfaceMemoryAccessor
-
uint8_t_AsHex
public String uint8_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
uint8_t_AsHexin interfaceMemoryAccessor
-
uint8_t_nativeToString
public String uint8_t_nativeToString(OpaqueMemory32 mem, long offset)
- Specified by:
uint8_t_nativeToStringin interfaceMemoryAccessor
-
uint16_t
public short uint16_t(OpaqueMemory32 mem, long offset)
- Specified by:
uint16_tin interfaceMemoryAccessor
-
uint16_t_AsInt
public int uint16_t_AsInt(OpaqueMemory32 mem, long offset)
- Specified by:
uint16_t_AsIntin interfaceMemoryAccessor
-
uint16_t
public void uint16_t(OpaqueMemory32 mem, long offset, short value)
- Specified by:
uint16_tin interfaceMemoryAccessor
-
uint16_t_FromInt
public void uint16_t_FromInt(OpaqueMemory32 mem, long offset, int value)
- Specified by:
uint16_t_FromIntin interfaceMemoryAccessor
-
uint16_t_AsHex
public String uint16_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
uint16_t_AsHexin interfaceMemoryAccessor
-
uint16_t_nativeToString
public String uint16_t_nativeToString(OpaqueMemory32 mem, long offset)
- Specified by:
uint16_t_nativeToStringin interfaceMemoryAccessor
-
uint32_t
public int uint32_t(OpaqueMemory32 mem, long offset)
- Specified by:
uint32_tin interfaceMemoryAccessor
-
uint32_t_AsLong
public long uint32_t_AsLong(OpaqueMemory32 mem, long offset)
- Specified by:
uint32_t_AsLongin interfaceMemoryAccessor
-
uint32_t
public void uint32_t(OpaqueMemory32 mem, long offset, int value)
- Specified by:
uint32_tin interfaceMemoryAccessor
-
uint32_t_FromLong
public void uint32_t_FromLong(OpaqueMemory32 mem, long offset, long value)
- Specified by:
uint32_t_FromLongin interfaceMemoryAccessor
-
uint32_t_AsHex
public String uint32_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
uint32_t_AsHexin interfaceMemoryAccessor
-
uint32_t_nativeToString
public String uint32_t_nativeToString(OpaqueMemory32 mem, long offset)
- Specified by:
uint32_t_nativeToStringin interfaceMemoryAccessor
-
uint64_t
public long uint64_t(OpaqueMemory32 mem, long offset)
- Specified by:
uint64_tin interfaceMemoryAccessor
-
uint64_t
public void uint64_t(OpaqueMemory32 mem, long offset, long value)
- Specified by:
uint64_tin interfaceMemoryAccessor
-
uint64_t_AsHex
public String uint64_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
uint64_t_AsHexin interfaceMemoryAccessor
-
uint64_t_nativeToString
public String uint64_t_nativeToString(OpaqueMemory32 mem, long offset)
- Specified by:
uint64_t_nativeToStringin interfaceMemoryAccessor
-
allocateMemory
public long allocateMemory(AbstractNativeMemory mem, long sizeInBytes)
- Specified by:
allocateMemoryin interfaceMemoryAccessor
-
uintptr_t_AsHex
public String uintptr_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
uintptr_t_AsHexin interfaceMemoryAccessor
-
uintptr_t_AsNativeAddressHolder
public NativeAddressHolder uintptr_t_AsNativeAddressHolder(OpaqueMemory32 mem, long offset)
- Specified by:
uintptr_t_AsNativeAddressHolderin interfaceMemoryAccessor
-
uintptr_t
public void uintptr_t(OpaqueMemory32 mem, long offset, OpaqueMemory32 destMem)
- Specified by:
uintptr_tin interfaceMemoryAccessor
-
uintptr_t
public void uintptr_t(OpaqueMemory32 mem, long offset, OpaqueMemory32 destMem, long destOffset)
- Specified by:
uintptr_tin interfaceMemoryAccessor
-
uintptr_t
public void uintptr_t(OpaqueMemory32 mem, long offset, ByteBuffer destMem)
- Specified by:
uintptr_tin interfaceMemoryAccessor
-
uintptr_t
public void uintptr_t(OpaqueMemory32 mem, long offset, NativeAddressHolder dest)
- Specified by:
uintptr_tin interfaceMemoryAccessor
-
uintptr_t
public void uintptr_t(OpaqueMemory32 mem, long offset, NativeFunctionPointer dest)
- Specified by:
uintptr_tin interfaceMemoryAccessor
-
uintptr_t_AtIndex
public long uintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index)
- Specified by:
uintptr_t_AtIndexin interfaceMemoryAccessor
-
uintptr_t_AtIndex_AsNativeAddressHolder
public NativeAddressHolder uintptr_t_AtIndex_AsNativeAddressHolder(OpaqueMemory32 mem, long offset, int index)
- Specified by:
uintptr_t_AtIndex_AsNativeAddressHolderin interfaceMemoryAccessor
-
uintptr_t_AtIndex
public void uintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index, long dest)
- Specified by:
uintptr_t_AtIndexin interfaceMemoryAccessor
-
uintptr_t_AtIndex
public void uintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index, OpaqueMemory32 destAddress)
- Specified by:
uintptr_t_AtIndexin interfaceMemoryAccessor
-
uintptr_t_AtIndex
public void uintptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index, NativeAddressHolder dest)
- Specified by:
uintptr_t_AtIndexin interfaceMemoryAccessor
-
signed_long
public long signed_long(OpaqueMemory32 mem, long offset)
Description copied from interface:MemoryAccessoraccess the native long (signed long) datatype. It m,ay be 32 or 64bis- Specified by:
signed_longin interfaceMemoryAccessor- Returns:
-
signed_long
public void signed_long(OpaqueMemory32 mem, long offset, long value)
Description copied from interface:MemoryAccessoraccess the native long (signed long) datatype. It m,ay be 32 or 64bis- Specified by:
signed_longin interfaceMemoryAccessor
-
unsigned_long
public long unsigned_long(OpaqueMemory32 mem, long offset)
Description copied from interface:MemoryAccessoraccess the native unsigned long datatype. It m,ay be 32 or 64bis- Specified by:
unsigned_longin interfaceMemoryAccessor- Returns:
-
unsigned_long
public void unsigned_long(OpaqueMemory32 mem, long offset, long value)
Description copied from interface:MemoryAccessoraccess the native unsigned long datatype. It m,ay be 32 or 64bis- Specified by:
unsigned_longin interfaceMemoryAccessor
-
signed_long_AtIndex
public long signed_long_AtIndex(OpaqueMemory32 mem, long offset, int index)
Description copied from interface:MemoryAccessoraccess the ith native unsigned long datatype. It m,ay be 32 or 64bis- Specified by:
signed_long_AtIndexin interfaceMemoryAccessor
-
signed_long_AtIndex
public void signed_long_AtIndex(OpaqueMemory32 mem, long offset, int index, long value)
Description copied from interface:MemoryAccessoraccess the ith native unsigned long datatype. It m,ay be 32 or 64bis- Specified by:
signed_long_AtIndexin interfaceMemoryAccessor
-
unsigned_long_AtIndex
public long unsigned_long_AtIndex(OpaqueMemory32 mem, long offset, int index)
Description copied from interface:MemoryAccessoraccess the ith native unsigned long datatype. It m,ay be 32 or 64bis- Specified by:
unsigned_long_AtIndexin interfaceMemoryAccessor
-
unsigned_long_AtIndex
public void unsigned_long_AtIndex(OpaqueMemory32 mem, long offset, int index, long value)
Description copied from interface:MemoryAccessoraccess the ith native unsigned long datatype. It m,ay be 32 or 64bis- Specified by:
unsigned_long_AtIndexin interfaceMemoryAccessor
-
intptr_t
public long intptr_t(OpaqueMemory32 mem, long offset)
- Specified by:
intptr_tin interfaceMemoryAccessor
-
intptr_t
public void intptr_t(OpaqueMemory32 mem, long offset, long dest)
- Specified by:
intptr_tin interfaceMemoryAccessor
-
intptr_t_AsHex
public String intptr_t_AsHex(OpaqueMemory32 mem, long offset)
- Specified by:
intptr_t_AsHexin interfaceMemoryAccessor
-
intptr_t_AtIndex
public long intptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index)
- Specified by:
intptr_t_AtIndexin interfaceMemoryAccessor
-
intptr_t_AtIndex
public void intptr_t_AtIndex(OpaqueMemory32 mem, long offset, int index, long dest)
- Specified by:
intptr_t_AtIndexin interfaceMemoryAccessor
-
uintptr_t
public long uintptr_t(OpaqueMemory32 mem, long offset)
- Specified by:
uintptr_tin interfaceMemoryAccessor
-
uintptr_t
public void uintptr_t(OpaqueMemory32 mem, long offset, long dest)
- Specified by:
uintptr_tin interfaceMemoryAccessor
-
getUTF_8String
public String getUTF_8String(OpaqueMemory32 mem, long offset)
Description copied from interface:MemoryAccessorthis is a NULL terminated string, so we have to fetch the complete string.- Specified by:
getUTF_8Stringin interfaceMemoryAccessor- Returns:
-
setUTF_8String
public void setUTF_8String(String s, int srcStart, OpaqueMemory32 mem, long offset, int len)
- Specified by:
setUTF_8Stringin interfaceMemoryAccessor
-
getUTF_8StringLength
public int getUTF_8StringLength(String s)
Description copied from interface:MemoryAccessorIn order to calculate the needed size in bytes, add a 1 for NULL termination!- Specified by:
getUTF_8StringLengthin interfaceMemoryAccessor- Returns:
-
getUnicodeString
public String getUnicodeString(OpaqueMemory32 mem, long offset, int start, int len)
- Specified by:
getUnicodeStringin interfaceMemoryAccessor
-
setUnicodeString
public void setUnicodeString(String s, int srcStart, OpaqueMemory32 mem, long offset, int destStart, int len)
- Specified by:
setUnicodeStringin interfaceMemoryAccessor
-
getUnicodeStringLength
public int getUnicodeStringLength(String s)
Description copied from interface:MemoryAccessorunderlying datatype is 16 bit wide, so multiply this by 2 for bytes needed! this will not be NULL terminated!- Specified by:
getUnicodeStringLengthin interfaceMemoryAccessor- Returns:
-
-