|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jouvieje.bass.misc.PointerUtils
Utility routines for dealing with Pointer.
Constructor Summary | |
PointerUtils()
|
Method Summary | |
static Pointer |
createSubView(Pointer pointer,
int offset)
|
static java.nio.ByteBuffer |
createView(Pointer pointer,
long capacityInBytes)
Create a view of the Pointer object as a ByteBuffer object. |
static int |
stringLength(Pointer pointer)
|
static java.lang.String |
toString(Pointer pointer)
Retrieve the String value stored in a Pointer (null terminated string). |
static java.lang.String |
toString(Pointer pointer,
int offset,
int length)
Retrieve the String value stored in the Pointer . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PointerUtils()
Method Detail |
public static java.nio.ByteBuffer createView(Pointer pointer, long capacityInBytes)
Pointer
object as a ByteBuffer
object.
pointer
- Pointer to view as a ByteBuffer.capacityInBytes
- capacity in BYTES of the buffer.
public static Pointer createSubView(Pointer pointer, int offset)
public static java.lang.String toString(Pointer pointer)
String
value stored in a Pointer
(null terminated string).
pointer
- a Pointer
that holds a String.
toString(Pointer, int, int)
public static java.lang.String toString(Pointer pointer, int offset, int length)
String
value stored in the Pointer
.
pointer
- a Pointer
that holds a String.offset
- offset (in characters) from the current position in the Pointer
.length
- length of the String to retrieve.
Pointer
.toString(Pointer)
,
BufferUtils.toString(ByteBuffer, int, int)
public static int stringLength(Pointer pointer)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |