|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.nativec.jna.JnaNativeHandle
public class JnaNativeHandle
Constructor Summary | |
---|---|
JnaNativeHandle(JnaNativeHandle handle,
int offset)
|
|
JnaNativeHandle(long address)
|
|
JnaNativeHandle(com.sun.jna.Pointer pointer)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
long |
getAddress()
The start address of the memory chunk |
byte |
getByte(int index)
Marshal the data at byte offset index from the start of the
memory chunk to a byte. |
byte[] |
getByteArray(int index,
int count)
Marshal the data at byte offset index from the start of the
memory chunk to a byte array of length count . |
long |
getCLong(int index)
Marshal the data at byte offset index from the start of the
memory chunk to a long. |
int |
getInt(int index)
Marshal the data at byte offset index from the start of the
memory chunk to an int. |
long |
getLong(int index)
Marshal the data at byte offset index from the start of the
memory chunk to a long value (which is always 8 byte). |
INativeHandle |
getNativeHandle(int index)
Marshal the data at byte offset index from the start of the
memory chunk to an INativeHandle . |
com.sun.jna.Pointer |
getPointer()
|
short |
getShort(int index)
Marshal the data at byte offset index from the start of the
memory chunk to a short. |
int |
getSize()
The size for the handle in bytes. |
java.lang.String |
getString(int index)
Marshal the data at byte offset index from the start of the
memory chunk to a String. |
java.lang.String |
getWideString(int index)
Marshal the data at byte offset index from the start of the
memory chunk to a String using the platform wide character conversion. |
int |
hashCode()
|
INativeHandle |
offset(int offset)
Create a new INativeHandle , offset from this by
offset bytes. |
void |
setByte(int index,
byte value)
Write a byte to the memory at byte offset index from the
start of the memory chunk. |
void |
setByteArray(int index,
byte[] value,
int valueOffset,
int valueCount)
Write a byte array to the memory at byte offset index from
the start of the memory chunk. |
void |
setCLong(int index,
long value)
Write a long to the memory at byte offset index from the
start of the memory chunk. |
void |
setInt(int index,
int value)
Write an int to the memory at byte offset index from the
start of the memory chunk. |
void |
setLong(int index,
long value)
Write a long to the memory at byte offset index from the
start of the memory chunk. |
void |
setNativeHandle(int index,
INativeHandle handle)
Write an INativeHandle to the memory at byte offset
index from the start of the memory chunk. |
void |
setShort(int index,
short value)
Write a short to the memory at byte offset index from the
start of the memory chunk. |
void |
setSize(int pSize)
Set the valid size for the handle to count bytes. |
void |
setString(int index,
java.lang.String value)
Write a String to the memory at byte offset index from the
start of the memory chunk. |
void |
setWideString(int index,
java.lang.String value)
Write a String to the memory at byte offset index from the
start of the memory chunk using the platform wide character conversion. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JnaNativeHandle(JnaNativeHandle handle, int offset)
public JnaNativeHandle(long address)
public JnaNativeHandle(com.sun.jna.Pointer pointer)
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public long getAddress()
INativeHandle
getAddress
in interface INativeHandle
public byte getByte(int index)
INativeHandle
index
from the start of the
memory chunk to a byte.
getByte
in interface INativeHandle
index
- The byte offset from the start of the memory chunk
public byte[] getByteArray(int index, int count)
INativeHandle
index
from the start of the
memory chunk to a byte array of length count
.
getByteArray
in interface INativeHandle
index
- The byte offset from the start of the memory chunkcount
- The size of the byte array
public long getCLong(int index)
INativeHandle
index
from the start of the
memory chunk to a long. Get only the "platform" number of bytes.
getCLong
in interface INativeHandle
index
- The byte offset from the start of the memory chunk
public int getInt(int index)
INativeHandle
index
from the start of the
memory chunk to an int.
getInt
in interface INativeHandle
index
- The byte offset from the start of the memory chunk
public long getLong(int index)
INativeHandle
index
from the start of the
memory chunk to a long value (which is always 8 byte).
getLong
in interface INativeHandle
index
- The byte offset from the start of the memory chunk
public INativeHandle getNativeHandle(int index)
INativeHandle
index
from the start of the
memory chunk to an INativeHandle
.
getNativeHandle
in interface INativeHandle
index
- The byte offset from the start of the memory chunk
INativeHandle
marshaled from the memory chunkpublic com.sun.jna.Pointer getPointer()
public short getShort(int index)
INativeHandle
index
from the start of the
memory chunk to a short.
getShort
in interface INativeHandle
index
- The byte offset from the start of the memory chunk
public int getSize()
INativeHandle
You can not access bytes from outside the range defined by getAdddress + size.
getSize
in interface INativeHandle
public java.lang.String getString(int index)
INativeHandle
index
from the start of the
memory chunk to a String.
getString
in interface INativeHandle
index
- The byte offset from the start of the memory chunk
public java.lang.String getWideString(int index)
INativeHandle
index
from the start of the
memory chunk to a String using the platform wide character conversion.
getWideString
in interface INativeHandle
index
- The byte offset from the start of the memory chunk
public int hashCode()
hashCode
in class java.lang.Object
public INativeHandle offset(int offset)
INativeHandle
INativeHandle
, offset from this by
offset
bytes.
offset
in interface INativeHandle
offset
- The byte offset from the start of the memory chunk
INativeHandle
pointing to "getAddress() + offset".public void setByte(int index, byte value)
INativeHandle
index
from the
start of the memory chunk.
setByte
in interface INativeHandle
index
- The byte offset from the start of the memory chunkvalue
- The value to write.public void setByteArray(int index, byte[] value, int valueOffset, int valueCount)
INativeHandle
index
from
the start of the memory chunk. The method will write
valueCount
bytes from value
starting at
valueOffset
.
setByteArray
in interface INativeHandle
index
- The byte offset from the start of the memory chunkvalue
- The value to write.public void setCLong(int index, long value)
INativeHandle
index
from the
start of the memory chunk. Write only the "platform" number of bytes. The
caller is responsible for observing the value range.
setCLong
in interface INativeHandle
index
- The byte offset from the start of the memory chunkvalue
- The value to write.public void setInt(int index, int value)
INativeHandle
index
from the
start of the memory chunk.
setInt
in interface INativeHandle
index
- The byte offset from the start of the memory chunkvalue
- The value to write.public void setLong(int index, long value)
INativeHandle
index
from the
start of the memory chunk.
setLong
in interface INativeHandle
index
- The byte offset from the start of the memory chunkvalue
- The value to write.public void setNativeHandle(int index, INativeHandle handle)
INativeHandle
INativeHandle
to the memory at byte offset
index
from the start of the memory chunk.
setNativeHandle
in interface INativeHandle
index
- The byte offset from the start of the memory chunkpublic void setShort(int index, short value)
INativeHandle
index
from the
start of the memory chunk.
setShort
in interface INativeHandle
index
- The byte offset from the start of the memory chunkvalue
- The value to write.public void setSize(int pSize)
INativeHandle
count
bytes.
You can not access bytes from outside the range defined by getAdddress + size.
setSize
in interface INativeHandle
pSize
- The size of the memory managed by the INativeHandle
public void setString(int index, java.lang.String value)
INativeHandle
index
from the
start of the memory chunk.
setString
in interface INativeHandle
index
- The byte offset from the start of the memory chunkvalue
- The value to write.public void setWideString(int index, java.lang.String value)
INativeHandle
index
from the
start of the memory chunk using the platform wide character conversion.
setWideString
in interface INativeHandle
index
- The byte offset from the start of the memory chunkvalue
- The value to write.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |