BackupImportDataPager

abstract class BackupImportDataPager<T>(entries: List<BackupPage>)

Handles paginated backup data import. This class provides functionality to process and consume data from multiple ordered pages with a custom mapping applied to the data.

It is guaranteed that the data will be read in the same order it was written during backup exporting.

Parameters

T

Type of the data elements that are contained in each backup page.

entries

Initial list of {@link BackupPage} representing the available backup pages. These pages are sorted based on their name, extracting numeric segments for ordering.

Inheritors

Constructors

Link copied to clipboard
internal constructor(entries: List<BackupPage>)

Properties

Link copied to clipboard
val totalPages: Int

Functions

Link copied to clipboard
fun hasMorePages(): Boolean
Link copied to clipboard
internal abstract fun mapPageData(mapper: MPBackupMapper, bytes: ByteArray): Array<T>
Link copied to clipboard
fun nextPage(): Array<T>

Gets the data stored in the next page, consuming it in the process.