public final class ChunkFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ChunkFactory.CommandDefinition
The definition of a Command, which a chunk may hold.
|
Constructor and Description |
---|
ChunkFactory(int version) |
Modifier and Type | Method and Description |
---|---|
Chunk |
createChunk(byte[] data,
int offset)
Creates the appropriate chunk at the given location.
|
static int |
getMaxRecordLength() |
int |
getVersion() |
static void |
setMaxRecordLength(int length) |
public ChunkFactory(int version) throws java.io.IOException
java.io.IOException
public static void setMaxRecordLength(int length)
length
- the max record length allowed for ChunkFactorypublic static int getMaxRecordLength()
public int getVersion()
public Chunk createChunk(byte[] data, int offset)
data
- the chunk bytesoffset
- the offset into the chunk bytes array to start reading fromCopyright 2022 The Apache Software Foundation or its licensors, as applicable.