The TSV analyzer is a Spring project designed to process TSV files and provide valuable insights.
It consists of two key methods:
-
This method reads the TSV file and returns an object called "tsvDetails."
The "tsvDetails" object encapsulates three important pieces of information:
- The total number of records in the file
- The total price calculated from the TSV data
- List of any duplicate values found in the file based on accountNumber and price
- This method allows you to save the TSV file. However, it includes an important error handling mechanism. If the TSV file contains any duplicate values, it throws an error to prevent the saving process.
Important
This api only works with TSV files with a specific format. here's the format:
[AccountName] [AccountNumber] [Price( preferably double )]