Package ch.bailu.gtk.type
Class 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
- All Implemented Interfaces:
PointerInterface
- Direct Known Subclasses:
Str
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBytes
(byte[] bytes) Bytes
(int size) Bytes
(PointerContainer pointer) Bytes
(PointerContainer pointer, int size) -
Method Summary
Methods inherited from class ch.bailu.gtk.type.Array
checkLimit, destroy, getLength, getSize, isSizeKnown
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
Bytes
-
Bytes
-
Bytes
public Bytes(byte[] bytes) -
Bytes
public Bytes(int size)
-
-
Method Details
-
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- Parameters:
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)
-