IndexedFileAnalyzer

class IndexedFileAnalyzer(configuration: IndexedFileAnalyzerConfiguration)

The IndexedFileAnalyzer understands options that are specified in detail in OptionKey, but listed in brief here:

-c --counts

Show record counts before each record, or the total count if neither -b nor -t is specified. -s --sizes Show record size before each record. -b --binary Output records contents in hex. -t --text Decode records as UTF-8 strings. If combined with -b, show printable ASCII characters to the right of the hex. -x=

--explode= Write each record to a separate file in the specified directory. -m --metadata Process the file's metadata, if present. -l= --lower= The zero-based lowest record number to process. Must be ≥ 0. -u= --upper= The zero-based upper record number to process. Must be ≥ -1.

-?

Display help text containing a description of the application and an enumeration of its options.

The name of the IndexedFile to analyze.

Author

Mark van Gulik

Richard Arriaga

Constructors

Link copied to clipboard
fun IndexedFileAnalyzer(configuration: IndexedFileAnalyzerConfiguration)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun analyze(output: PrintStream)
fun analyze(recordAcceptor: (String) -> Unit)

Analyze the indexedFile writing the results of the analysis to the provided PrintStream.

Link copied to clipboard
fun close()

Close the backing indexedFile.

Properties

Link copied to clipboard
val indices: LongRange

The LongRange (IndexedFileAnalyzerConfiguration.lower..IndexedFileAnalyzerConfiguration.upper) of indices of records in the file that fall between the optionally specified bounds of the configuration.