public static class NetworkMarker.EmptyBufferMarker extends NetworkMarker
NetworkMarker.EmptyBufferMarker
Constructor and Description |
---|
NetworkMarker.EmptyBufferMarker(ConnectionSide side) |
Modifier and Type | Method and Description |
---|---|
protected java.nio.ByteBuffer |
addHeader(java.nio.ByteBuffer buffer,
PacketType type)
Return the byte buffer prepended with the packet header.
|
protected java.io.DataInputStream |
addHeader(java.io.DataInputStream input,
PacketType type)
Return the input stream prepended with the packet header.
|
protected java.io.DataInputStream |
skipHeader(java.io.DataInputStream input)
Return an input stream without the header in the current packet.
|
addOutputHandler, getByteBuffer, getInputBuffer, getInputBuffer, getInputStream, getInputStream, getNetworkMarker, getOutputHandlers, getSerializer, getSide, hasOutputHandlers, removeOutputHandler, requireOutputHeader, skipHeader
public NetworkMarker.EmptyBufferMarker(@Nonnull ConnectionSide side)
protected java.io.DataInputStream skipHeader(java.io.DataInputStream input) throws java.io.IOException
NetworkMarker
It's safe to modify the input stream.
skipHeader
in class NetworkMarker
java.io.IOException
protected java.nio.ByteBuffer addHeader(java.nio.ByteBuffer buffer, PacketType type)
NetworkMarker
addHeader
in class NetworkMarker
buffer
- - the read-only byte buffer.type
- - the current packet.protected java.io.DataInputStream addHeader(java.io.DataInputStream input, PacketType type)
NetworkMarker
addHeader
in class NetworkMarker
input
- - the input stream.type
- - the current packet.