Class AbstractSerialDataReader

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract int available()
      Get the number of bytes available in the serial data receive buffer.
      void discardData()
      discard/drain all available bytes from the serial port/device.
      abstract byte[] read()
      Reads all available bytes bytes from the port/serial device.
      abstract byte[] read​(int length)
      Reads a length of bytes from the port/serial device.
      void read​(int length, OutputStream stream)
      Reads a length bytes from the serial port/device into a provided OutputStream.
      void read​(int length, ByteBuffer buffer)
      Reads a length bytes from the serial port/device into a provided ByteBuffer.
      CharBuffer read​(int length, Charset charset)
      Reads a length of bytes from the port/serial device and returns a CharBuffer from the decoded bytes.
      void read​(int length, Charset charset, Writer writer)
      Reads a length bytes from the serial port/device into a provided Writer.
      void read​(int length, Collection<ByteBuffer> collection)
      Reads a length of bytes from the serial port/device into a provided collection of ByteBuffer objects.
      void read​(OutputStream stream)
      Reads all available bytes from the serial device into a provided OutputStream.
      void read​(ByteBuffer buffer)
      Reads all available bytes from the serial device into a provided ByteBuffer.
      CharBuffer read​(Charset charset)
      Reads all available bytes from the port/serial device and returns a CharBuffer from the decoded bytes.
      void read​(Charset charset, Writer writer)
      Reads all available bytes from the serial port/device into a provided Writer.
      void read​(Collection<ByteBuffer> collection)
      Reads all available bytes from the serial port/device into a provided collection of ByteBuffer objects.