Package ch.bailu.gtk.type
Klasse Bytes
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Wrapper
ch.bailu.gtk.type.Array
ch.bailu.gtk.type.Bytes
- Alle implementierten Schnittstellen:
PointerInterface
- Bekannte direkte Unterklassen:
Str
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungBytes
(byte[] bytes) Allocates a byte array in the c heap of size bytes.length.Bytes
(byte[] bytes, byte terminate) Allocates a byte array of size bytes.length + 1) in the c heap.Bytes
(int size) Allocates a byte array in the c heap of a specific size.Bytes
(PointerContainer pointer) Create a reference to a byte array of unknown sizeBytes
(PointerContainer pointer, int size) Create a reference to a byte array of specific size -
Methodenübersicht
Von Klasse geerbte Methoden ch.bailu.gtk.type.Array
checkLimit, destroy, getLength, getSize, isSizeKnown
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
Bytes
Create a reference to a byte array of specific size- Parameter:
pointer
- pointer to byte arraysize
- size of byte array
-
Bytes
Create a reference to a byte array of unknown size- Parameter:
pointer
- pointer to byte array
-
Bytes
public Bytes(byte[] bytes) Allocates a byte array in the c heap of size bytes.length. Copies bytes to allocated array.- Parameter:
bytes
- bytes to copy to c heap
-
Bytes
public Bytes(byte[] bytes, byte terminate) Allocates a byte array of size bytes.length + 1) in the c heap. Copies bytes to allocated array and adds one byte at the end.- Parameter:
bytes
- bytes to copy to the allocated arrayterminate
- byte to add at the end of the allocated array
-
Bytes
public Bytes(int size) Allocates a byte array in the c heap of a specific size. Array is initialized with zeros.- Parameter:
size
- size of new array
-
-
Methodendetails
-
getByte
public byte getByte(int index) -
setByte
public void setByte(int index, byte value) -
setInt
public void setInt(int index, int value) Write value to the next four bytes starting at index- Parameter:
index
- index in byte array for the first bytevalue
- integer (four bytes) to write into byte array
-
toBytes
public byte[] toBytes() -
toBytes
public byte[] toBytes(int start, int end)
-