public class EventQueueNatives extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
endReadExtendedData()
The Java listener finished to read the data from the event queue.
|
static void |
initialize()
Initializes the event queue.
|
static int |
nativeAvailable()
Returns the number of bytes that can be read (or skipped over).
|
static int |
nativeRead(byte[] b,
int off,
int len)
Reads up to len bytes of data and store them into the buffer array b.
|
static boolean |
nativeReadBoolean()
Gets the next boolean of data.
|
static byte |
nativeReadByte()
Gets the next byte of data.
|
static char |
nativeReadChar()
Gets the next char of data.
|
static double |
nativeReadDouble()
Gets the next double of data.
|
static float |
nativeReadFloat()
Gets the next float of data.
|
static int |
nativeReadInt()
Gets the next integer of data.
|
static long |
nativeReadLong()
Gets the next long of data.
|
static short |
nativeReadShort()
Gets the next short of data.
|
static int |
nativeReadUnsignedByte()
Gets the next unsigned byte of data.
|
static int |
nativeReadUnsignedShort()
Gets the next unsigned short of data.
|
static int |
nativeSkipBytes(int n)
Skips n bytes.
|
static boolean |
offerEvent(int type,
int data)
Offers an event to the queue.
|
static boolean |
offerExtendedEvent(int type,
byte[] data,
int length)
Offers an extended event to the queue.
|
static void |
startReadExtendedData(int dataLength)
Starts to read an extended data.
|
static int |
waitEvent()
Waits for an event from the queue and returns it.
|
public static void endReadExtendedData()
public static void initialize()
public static int nativeAvailable()
public static int nativeRead(byte[] b,
int off,
int len)
throws IOException
b - the buffer into which the data is read.off - the start offset in array b at which the data is written.len - the number of bytes to read.IOException - if there are not enough bytes remaining in the data of
the extended event or if the buffer is too small to store
the event data.public static boolean nativeReadBoolean()
throws IOException
IOException - if there is no boolean remaining in the data of the
extended event.public static byte nativeReadByte()
throws IOException
IOException - if there is no byte remaining in the data of the extended
event.public static char nativeReadChar()
throws IOException
IOException - if there is no char remaining in the data of the extended
event.public static double nativeReadDouble()
throws IOException
IOException - if there is no double remaining in the data of the
extended event.public static float nativeReadFloat()
throws IOException
IOException - if there is no float remaining in the data of the
extended event.public static int nativeReadInt()
throws IOException
IOException - if there is no integer remaining in the data of the
extended event.public static long nativeReadLong()
throws IOException
IOException - if there is no long remaining in the data of the extended
event.public static short nativeReadShort()
throws IOException
IOException - if there is no short remaining in the data of the
extended event.public static int nativeReadUnsignedByte()
throws IOException
IOException - if there is no unsigned byte remaining in the data of the
extended event.public static int nativeReadUnsignedShort()
throws IOException
IOException - if there is no unsigned short remaining in the data of
the extended event.public static int nativeSkipBytes(int n)
n - the number of bytes to skip.public static boolean offerEvent(int type,
int data)
type - the type of the event.data - the data of the event.public static boolean offerExtendedEvent(int type,
byte[] data,
int length)
type - the type of the event.data - the data of the event.length - the number of bytes in the data.public static void startReadExtendedData(int dataLength)
dataLength - the number of bytes of the extended data.public static int waitEvent()