Package com.comphenix.protocol.events
Class NetworkMarker.EmptyBufferMarker
java.lang.Object
com.comphenix.protocol.events.NetworkMarker
com.comphenix.protocol.events.NetworkMarker.EmptyBufferMarker
- Enclosing class:
- NetworkMarker
-
Nested Class Summary
Nested classes/interfaces inherited from class com.comphenix.protocol.events.NetworkMarker
NetworkMarker.EmptyBufferMarker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DataInputStreamaddHeader(DataInputStream input, PacketType type)Return the input stream prepended with the packet header.protected ByteBufferaddHeader(ByteBuffer buffer, PacketType type)Return the byte buffer prepended with the packet header.protected DataInputStreamskipHeader(DataInputStream input)Return an input stream without the header in the current packet.Methods inherited from class com.comphenix.protocol.events.NetworkMarker
addOutputHandler, addPostListener, getByteBuffer, getInputBuffer, getInputBuffer, getInputStream, getInputStream, getNetworkMarker, getOutputHandlers, getPostListeners, getScheduledPackets, getSerializer, getSide, hasOutputHandlers, hasPostListeners, readScheduledPackets, removeOutputHandler, removePostListener, requireOutputHeader, skipHeader
-
Constructor Details
-
EmptyBufferMarker
-
-
Method Details
-
skipHeader
Description copied from class:NetworkMarkerReturn an input stream without the header in the current packet.It's safe to modify the input stream.
- Specified by:
skipHeaderin classNetworkMarker- Parameters:
input- - input stream- Returns:
- An input stream without the header
- Throws:
IOException- If integer reading fails
-
addHeader
Description copied from class:NetworkMarkerReturn the byte buffer prepended with the packet header.- Specified by:
addHeaderin classNetworkMarker- Parameters:
buffer- - the read-only byte buffer.type- - the current packet.- Returns:
- The byte buffer.
-
addHeader
Description copied from class:NetworkMarkerReturn the input stream prepended with the packet header.- Specified by:
addHeaderin classNetworkMarker- Parameters:
input- - the input stream.type- - the current packet.- Returns:
- The byte buffer.
-