Interface SpiDevice

  • All Known Implementing Classes:
    SpiDeviceImpl

    public interface SpiDevice
    • Method Detail

      • write

        String write​(String data,
                     Charset charset)
              throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        data - bytes (encoded in string) to write to the SPI device
        charset - character encoding for bytes in string
        Returns:
        resulting bytes read from the SPI device after the write operation
        Throws:
        IOException
      • write

        String write​(String data,
                     String charset)
              throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        data - bytes (encoded in string) to write to the SPI device
        charset - character encoding for bytes in string
        Returns:
        resulting bytes read from the SPI device after the write operation
        Throws:
        IOException
      • write

        ByteBuffer write​(ByteBuffer data)
                  throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        data - bytes to write to the SPI device
        Returns:
        resulting bytes read from the SPI device after the write operation
        Throws:
        IOException
      • write

        byte[] write​(InputStream input)
              throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        input - input stream to read from to get bytes to write to the SPI device
        Returns:
        resulting bytes read from the SPI device after the write operation
        Throws:
        IOException
      • write

        int write​(InputStream input,
                  OutputStream output)
           throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        input - input stream to read from to get bytes to write to the SPI device
        output - output stream to write bytes read from the SPI device
        Returns:
        number of resulting bytes read from the SPI device and written to the output stream
        Throws:
        IOException
      • write

        byte[] write​(byte[] data,
                     int start,
                     int length)
              throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        data - bytes to write to the SPI device
        start - start index position in the data buffer to start writing from
        length - length of bytes to write from the data buffer
        Returns:
        resulting bytes read from the SPI device after the write operation
        Throws:
        IOException
      • write

        byte[] write​(byte... data)
              throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        data - bytes to write to the SPI device
        Returns:
        resulting bytes read from the SPI device after the write operation
        Throws:
        IOException
      • write

        short[] write​(short[] data,
                      int start,
                      int length)
               throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        data - bytes to write to the SPI device
        start - start index position in the data buffer to start writing from
        length - length of bytes to write from the data buffer
        Returns:
        resulting bytes read from the SPI device after the write operation
        Throws:
        IOException
      • write

        short[] write​(short... data)
               throws IOException
        Attempts to read/write data through this SPI device
        Parameters:
        data - bytes to write to the SPI device (Note: short value should not exceed 255.)
        Returns:
        resulting bytes read from the SPI device after the write operation
        Throws:
        IOException