public class Chunk extends Packet
| Modifier and Type | Field and Description |
|---|---|
Short |
chunkFormat |
Short |
headerSize |
static Logger |
logger |
int |
packetCount |
ByteArrayOutputStream |
stream |
PACKET_HEADER| Constructor and Description |
|---|
Chunk(long chunkMaxSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFitFormattedPacket() |
void |
chunkFormattedPacket() |
void |
compilePacket(Packet packet)
Compile but don't add to the chunk yet.
|
PacketType |
getPacketType()
Intended to return the type of the packet.
|
int |
getSize()
This method returns the total occupied memory size of this packet.
|
long |
millisecondsSinceTheFirstPacket() |
getBytes, getLevel, getStringSize, getThreadId, isThreadSafe, lock, setBytes, setLevel, setThreadSafe, unlockpublic static final Logger logger
public Short headerSize
public Short chunkFormat
public ByteArrayOutputStream stream
public int packetCount
public int getSize()
Packetpublic PacketType getPacketType()
PacketgetPacketType in class Packetpublic void compilePacket(Packet packet) throws IOException
packet - packet to compileIOException - io exceptionpublic boolean canFitFormattedPacket()
public void chunkFormattedPacket()
throws IOException
IOExceptionpublic long millisecondsSinceTheFirstPacket()
Copyright © 2023. All rights reserved.