Class PagedInputStream

java.lang.Object
java.io.InputStream
com.mckoi.util.PagedInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public abstract class PagedInputStream extends InputStream
An implementation of InputStream that reads data from an underlying representation in fixed sized pages. This object maintains a single buffer that is the size of a page. This implementation supports 'skip' and buffered access to the data.

The only method that needs to be implemented is the 'readPageContent' method.

Author:
Tobias Downer
  • Constructor Details

    • PagedInputStream

      public PagedInputStream(int page_size, long total_size)
      Constructs the input stream.
      Parameters:
      page_size - the size of the pages when accessing the underlying stream.
      total_size - the total size of the underlying data set.
  • Method Details