Package de.brifle.sdk.helper.csv
Class CSVParser
java.lang.Object
de.brifle.sdk.helper.csv.CSVParser
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
HMAC_HEADER
- See Also:
-
-
Constructor Details
-
CSVParser
public CSVParser(byte[] macKey) -
CSVParser
-
-
Method Details
-
read
public CSVParser read(String path, boolean validateHMAC) throws IOException, HMacHeaderMissingException, HMacValidationFailedException read a csv file and parse it. If validateHMAC is set to true, the HMAC header must be present in the file and the HMACs will be validated.- Parameters:
path-validateHMAC-- Returns:
- Throws:
IOExceptionHMacHeaderMissingException- if the HMAC header is missing and validateHMAC is set to trueHMacValidationFailedException- if the HMAC validation fails, a rows was tampered with
-
readString
public CSVParser readString(String csvString, boolean validateHMAC) throws IOException, HMacHeaderMissingException, HMacValidationFailedException -
getHeader
-
getRows
-