public interface EventDataReader
EventDataReaders are created by the system and passed to extended events listeners when calling
EventQueueListener.handleExtendedEvent(int, EventDataReader)
method.
There are two ways to read the data of an extended event:
read(byte[], int, int)
or readFully(byte[])
methods.
EventQueueListener.handleExtendedEvent(int, EventDataReader)
.readBoolean()
or
readByte()
.
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes that can be read (or skipped over).
|
int |
read(byte[] b,
int off,
int len)
Reads
len bytes of data and store them into the buffer b . |
boolean |
readBoolean()
Reads the next boolean of data.
|
byte |
readByte()
Reads the next byte of data.
|
char |
readChar()
Reads the next char of data.
|
double |
readDouble()
Reads the next double of data.
|
float |
readFloat()
Reads the next float of data.
|
int |
readFully(byte[] b)
Reads all the bytes of data and store them into the buffer
b . |
int |
readInt()
Reads the next integer of data.
|
long |
readLong()
Reads the next long of data.
|
short |
readShort()
Reads the next short of data.
|
int |
readUnsignedByte()
Reads the next unsigned byte of data.
|
int |
readUnsignedShort()
Reads the next unsigned short of data.
|
int |
skipBytes(int n)
Skips over and discard
n bytes of data. |
int available()
int read(byte[] b, int off, int len) throws IOException
len
bytes of data and store them into the buffer b
.b
- the buffer into which the data is read.off
- the start offset in the buffer 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.boolean readBoolean() throws IOException
IOException
- if there is no boolean remaining in the data of the extended event.byte readByte() throws IOException
IOException
- if there is no byte remaining in the data of the extended event.char readChar() throws IOException
IOException
- if there is no char remaining in the data of the extended event.double readDouble() throws IOException
IOException
- if there is no double remaining in the data of the extended event.float readFloat() throws IOException
IOException
- if there is no float remaining in the data of the extended event.int readFully(byte[] b) throws IOException
b
.b
- the buffer into which the data is read.IOException
- if there is no byte remaining in the data of the extended event or if the buffer is too small to
store the event data.int readInt() throws IOException
IOException
- if there is no integer remaining in the data of the extended event.long readLong() throws IOException
IOException
- if there is no long remaining in the data of the extended event.short readShort() throws IOException
IOException
- if there is no short remaining in the data of the extended event.int readUnsignedByte() throws IOException
IOException
- if there is no unsigned byte remaining in the data of the extended event.int readUnsignedShort() throws IOException
IOException
- if there is no unsigned short remaining in the data of the extended event.int skipBytes(int n)
n
bytes of data.n
- the number of bytes to skip.