Interface SequentialRead

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable

    public interface SequentialRead
    extends java.io.Closeable
    An interface allowing sequential read operations.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int read()
      Read a single byte of data.
      int read​(byte[] b)
      Read a buffer of data.
      int read​(byte[] b, int offset, int length)
      Read a buffer of data.
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • read

        int read()
          throws java.io.IOException
        Read a single byte of data.
        Returns:
        The byte of data that is being read.
        Throws:
        java.io.IOException - If there is an error while reading the data.
      • read

        int read​(byte[] b)
          throws java.io.IOException
        Read a buffer of data.
        Parameters:
        b - The buffer to write the data to.
        Returns:
        The number of bytes that were actually read.
        Throws:
        java.io.IOException - If there was an error while reading the data.
      • read

        int read​(byte[] b,
                 int offset,
                 int length)
          throws java.io.IOException
        Read a buffer of data.
        Parameters:
        b - The buffer to write the data to.
        offset - Offset into the buffer to start writing.
        length - The amount of data to attempt to read.
        Returns:
        The number of bytes that were actually read.
        Throws:
        java.io.IOException - If there was an error while reading the data.