|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.cardon.nativecall.NativeObject
be.cardon.nativecall.NativeByteArray
public class NativeByteArray
Wrapped class for native char, char[]
type.
Class with read only support.
Field Summary |
---|
Fields inherited from class be.cardon.nativecall.NativeObject |
---|
BYTE_SIZE, INT_SIZE, LLC |
Constructor Summary | |
---|---|
NativeByteArray(int LengthInBytes)
allocates a new byte array |
|
NativeByteArray(int LengthInBytes,
int address)
existing byte array. |
|
NativeByteArray(int LengthInBytes,
int address,
boolean readOnly)
existing byte array, with protection or not. |
Method Summary | |
---|---|
static NativeByteArray |
newInstance(NativeObject obj)
Convert a NativeObject in a NativeByteArray. |
byte[] |
read()
return the whole buffer content. |
byte[] |
read(int offset,
int len)
return the bytes, beginning at the given offset, and with the given length. |
void |
write(byte[] data)
write the given byte in the buffer. |
void |
write(byte[] data,
int offset)
write the given byte array in the buffer. |
Methods inherited from class be.cardon.nativecall.NativeObject |
---|
finalize, getAddress, getLength, isReadOnly, setReadOnly |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NativeByteArray(int LengthInBytes) throws NativeCallException
NativeCallException
public NativeByteArray(int LengthInBytes, int address) throws NativeCallException
NativeCallException
public NativeByteArray(int LengthInBytes, int address, boolean readOnly) throws NativeCallException
NativeCallException
Method Detail |
---|
public static NativeByteArray newInstance(NativeObject obj) throws NativeCallException
NativeCallException
public byte[] read() throws NativeCallException
NativeCallException
public byte[] read(int offset, int len) throws NativeCallException
NativeCallException
public void write(byte[] data, int offset) throws NativeCallException
NativeCallException
public void write(byte[] data) throws NativeCallException
NativeCallException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |