Package naga.packetreader
Class AsciiLinePacketReader
java.lang.Object
naga.packetreader.DelimiterPacketReader
naga.packetreader.AsciiLinePacketReader
- All Implemented Interfaces:
PacketReader
Reads a bytestream delimited by '\n'.
This can be used for reading lines of ASCII characters.
- Author:
- Christoffer Lerno
-
Field Summary
Fields inherited from interface naga.PacketReader
SKIP_PACKET
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a '\n' delimited reader with an unlimited max buffer size.AsciiLinePacketReader
(int maxLineLength) Creates a '\n' delimited reader with the given max line length and default read buffer size. -
Method Summary
Methods inherited from class naga.packetreader.DelimiterPacketReader
getMaxPacketSize, nextPacket, setMaxPacketSize
-
Constructor Details
-
AsciiLinePacketReader
public AsciiLinePacketReader()Creates a '\n' delimited reader with an unlimited max buffer size. -
AsciiLinePacketReader
public AsciiLinePacketReader(int maxLineLength) Creates a '\n' delimited reader with the given max line length and default read buffer size.Exceeding the line length will throw an IOException.
- Parameters:
maxLineLength
- maximum line length.
-