ZeroDelimitedPacketReader (Naga API)
Date: 2016-06-28

naga.packetreader

## Class ZeroDelimitedPacketReader

- java.lang.Object
- - naga.packetreader.DelimiterPacketReader
  - - naga.packetreader.ZeroDelimitedPacketReader

- All Implemented Interfaces:
    PacketReader

      public class ZeroDelimitedPacketReader
      extends DelimiterPacketReader

  Reads a bytestream delimited by 0.
  Author:
    Christoffer Lerno

- - ### Field Summary

    - ### Fields inherited from interface naga.PacketReader

      `SKIP_PACKET`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZeroDelimitedPacketReader()` Creates zero delimited reader with an unlimited max packet size.
    `ZeroDelimitedPacketReader(int maxPacketSize)` Creates a zero delimited reader with the given max packet size and read buffer size.

  - ### Method Summary

    - ### Methods inherited from class naga.packetreader.DelimiterPacketReader

      `getMaxPacketSize, nextPacket, setMaxPacketSize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ZeroDelimitedPacketReader

          public ZeroDelimitedPacketReader()

      Creates zero delimited reader with an unlimited max packet size.

    - #### ZeroDelimitedPacketReader

          public ZeroDelimitedPacketReader(int maxPacketSize)

      Creates a zero delimited reader with the given max packet size and read buffer size.

      Exceeding the packet size will throw a ProtocolViolationException.

      Parameters:
        `maxPacketSize` - the maximum packet size to accept.