code: public static boolean eofIsNext(final RawPacket rawPacket) {
          final ByteBuffer buf = rawPacket.getByteBuffer();
          return (buf.get(0) == (byte)0xfe && buf.capacity() < 9);
  
      }
docs: Checks whether the next packet is EOF.
  @param rawPacket the raw packet
  @return true if the packet is an EOF packet