
public abstract class AbstractPerfDataBufferPrologue extends Object
The PerfDataBufferProlog class supports parsing of the following C structure:
typedef struct {
jint magic; // magic number - 0xcafec0c0
jbyte byte_order; // byte order of the buffer
jbyte major_version; // major and minor version numbers
jbyte minor_version;
jbyte reserved_byte1; // reserved - see concrete implementations for
// possible definition.
... // remainder is handled by the subclasses.
} PerfDataPrologue
| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
byteBuffer |
static String |
PERFDATA_MAJOR_NAME |
static String |
PERFDATA_MINOR_NAME |
| Constructor and Description |
|---|
AbstractPerfDataBufferPrologue(ByteBuffer byteBuffer)
Construct a PerfDataBufferPrologue instance.
|
| Modifier and Type | Method and Description |
|---|---|
ByteOrder |
getByteOrder()
Get the byte order.
|
static ByteOrder |
getByteOrder(ByteBuffer bb)
Get the byte order for the given ByteBuffer.
|
int |
getMagic()
Get the magic number.
|
static int |
getMagic(ByteBuffer bb)
Get the magic number from the given byteBuffer.
|
int |
getMajorVersion()
Get the major version.
|
static int |
getMajorVersion(ByteBuffer bb)
Get the major version number from the given ByteBuffer.
|
int |
getMinorVersion()
Get the minor version.
|
static int |
getMinorVersion(ByteBuffer bb)
Get the minor version number from the given ByteBuffer.
|
int |
getSize()
Get the size of the header portion of the instrumentation buffer.
|
abstract boolean |
isAccessible()
Get the accessible flag.
|
IntBuffer |
majorVersionBuffer()
Return an IntBuffer that accesses the major version number.
|
IntBuffer |
minorVersionBuffer()
Return an IntBuffer that accesses the minor version number.
|
abstract boolean |
supportsAccessible()
Test if the accessible flag is supported by this version of
the PerfDataBufferPrologue.
|
protected ByteBuffer byteBuffer
public static final String PERFDATA_MAJOR_NAME
public static final String PERFDATA_MINOR_NAME
public AbstractPerfDataBufferPrologue(ByteBuffer byteBuffer) throws MonitorException
byteBuffer - buffer containing the instrumentation dataMonitorExceptionpublic int getMagic()
public ByteOrder getByteOrder()
public int getMajorVersion()
public int getMinorVersion()
public abstract boolean isAccessible()
supportsAccessible()public abstract boolean supportsAccessible()
isAccessible()public int getSize()
public IntBuffer majorVersionBuffer()
public IntBuffer minorVersionBuffer()
public static int getMagic(ByteBuffer bb)
public static int getMajorVersion(ByteBuffer bb)
public static int getMinorVersion(ByteBuffer bb)
public static ByteOrder getByteOrder(ByteBuffer bb)
Copyright © 2017–2018 earcam. All rights reserved.