Class AsciiLinePacketReader

java.lang.Object
naga.packetreader.DelimiterPacketReader
naga.packetreader.AsciiLinePacketReader
All Implemented Interfaces:
PacketReader

public class AsciiLinePacketReader extends DelimiterPacketReader
Reads a bytestream delimited by '\n'.

This can be used for reading lines of ASCII characters.

Author:
Christoffer Lerno
  • 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.