Class SeekableFileChannelInputView

    • Method Detail

      • nextSegment

        protected MemorySegment nextSegment​(MemorySegment current)
                                     throws IOException
        Description copied from class: AbstractPagedInputView
        The method by which concrete subclasses realize page crossing. This method is invoked when the current page is exhausted and a new page is required to continue the reading. If no further page is available, this method must throw an EOFException.
        Specified by:
        nextSegment in class AbstractPagedInputView
        Parameters:
        current - The current page that was read to its limit. May be null, if this method is invoked for the first time.
        Returns:
        The next page from which the reading should continue. May not be null. If the input is exhausted, an EOFException must be thrown instead.
        Throws:
        EOFException - Thrown, if no further segment is available.
        IOException - Thrown, if the method cannot provide the next page due to an I/O related problem.
      • getLimitForSegment

        protected int getLimitForSegment​(MemorySegment segment)
        Description copied from class: AbstractPagedInputView
        Gets the limit for reading bytes from the given memory segment. This method must return the position of the byte after the last valid byte in the given memory segment. When the position returned by this method is reached, the view will attempt to switch to the next memory segment.
        Specified by:
        getLimitForSegment in class AbstractPagedInputView
        Parameters:
        segment - The segment to determine the limit for.
        Returns:
        The limit for the given memory segment.