Package naga.packetwriter
Class DelimiterPacketWriter
java.lang.Object
naga.packetwriter.DelimiterPacketWriter
- All Implemented Interfaces:
PacketWriter
- Direct Known Subclasses:
AsciiLinePacketWriter
,ZeroDelimitedPacketWriter
Class to write a byte stream delimited by a byte marking the end of a packet.
- Author:
- Christoffer Lerno
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwrite
(ByteBuffer[] byteBuffer) Convert the incoming bytes to the bytes to be serialized.
-
Constructor Details
-
DelimiterPacketWriter
public DelimiterPacketWriter(byte endByte)
-
-
Method Details
-
write
Description copied from interface:PacketWriter
Convert the incoming bytes to the bytes to be serialized.- Specified by:
write
in interfacePacketWriter
- Parameters:
byteBuffer
- an array of ByteBuffers containing data the bytes to be written.- Returns:
- the resulting array of ByteBuffers.
-