public class Chunk extends Object
| Constructor and Description |
|---|
Chunk(DataInput input,
int offset,
byte[] reusableBuffer) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
fill(long upToPosition)
Copy data from the input source to the chunk buffer.
|
short |
getMajorVersion() |
short |
getMinorVersion() |
int |
getPosition() |
byte[] |
getReusableBuffer()
Return the current data buffer.
|
void |
skip(long upToPosition)
Skip reading data from the input source up to a specified position.
|
public Chunk(DataInput input, int offset, byte[] reusableBuffer) throws IOException, InvalidJfrFileException
input - input to read chunk data fromoffset - initial positionreusableBuffer - a byte array for holding read chunk dataIOExceptionInvalidJfrFileExceptionpublic short getMajorVersion()
public short getMinorVersion()
public int getPosition()
public byte[] fill(long upToPosition)
throws IOException,
InvalidJfrFileException
upToPosition - position to fill buffer toIOExceptionInvalidJfrFileExceptionpublic void skip(long upToPosition)
throws IOException,
InvalidJfrFileException
upToPosition - chunk relative positionIOExceptionInvalidJfrFileExceptionpublic byte[] getReusableBuffer()
Copyright © 2020. All rights reserved.