Interface SeekableReadOnlyByteChannel

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close this channel.
      long getPosition()  
      int read()
      Read a single byte of data.
      int read​(byte[] buffer, int off, int count)
      Read up to count bytes to the specified buffer.
      int readFully​(byte[] buffer, int count)
      Read exactly count bytes to the specified buffer.
      void setPosition​(long pos)  
    • Method Detail

      • getPosition

        long getPosition()
                  throws java.io.IOException
        Returns:
        the current position in the channel
        Throws:
        java.io.IOException - .
      • setPosition

        void setPosition​(long pos)
                  throws java.io.IOException
        Parameters:
        pos - the position in the channel
        Throws:
        java.io.IOException - .
      • read

        int read()
          throws java.io.IOException
        Read a single byte of data.
        Returns:
        read read
        Throws:
        java.io.IOException - .
      • read

        int read​(byte[] buffer,
                 int off,
                 int count)
          throws java.io.IOException
        Read up to count bytes to the specified buffer.
        Parameters:
        buffer - .
        off - .
        count - .
        Returns:
        read read
        Throws:
        java.io.IOException - .
      • readFully

        int readFully​(byte[] buffer,
                      int count)
               throws java.io.IOException
        Read exactly count bytes to the specified buffer.
        Parameters:
        buffer - where to store the read data
        count - how many bytes to read
        Returns:
        bytes read || -1 if IO problem
        Throws:
        java.io.IOException - .
      • close

        void close()
            throws java.io.IOException
        Close this channel.
        Throws:
        java.io.IOException - .