Package naga.packetwriter
Class DelimiterPacketWriter
- java.lang.Object
-
- naga.packetwriter.DelimiterPacketWriter
-
- All Implemented Interfaces:
PacketWriter
- Direct Known Subclasses:
AsciiLinePacketWriter
,ZeroDelimitedPacketWriter
public class DelimiterPacketWriter extends java.lang.Object implements PacketWriter
Class to write a byte stream delimited by a byte marking the end of a packet.- Author:
- Christoffer Lerno
-
-
Constructor Summary
Constructors Constructor Description DelimiterPacketWriter(byte endByte)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer[]
write(java.nio.ByteBuffer[] byteBuffer)
Convert the incoming bytes to the bytes to be serialized.
-
-
-
Method Detail
-
write
public java.nio.ByteBuffer[] write(java.nio.ByteBuffer[] byteBuffer)
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.
-
-