Package de.brifle.sdk.helper.csv
Class CSVBuilder
java.lang.Object
de.brifle.sdk.helper.csv.CSVBuilder
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCSVBuilder(byte[] macKey, String[] header) CSVBuilder(String[] header) CSVBuilder(String macKey, String[] header) -
Method Summary
Modifier and TypeMethodDescriptionadd a row to the csv bufferbuild()build the csv bufferreturns the used hmac key as hex stringwriteToFile(String path) write the csv buffer to a file
-
Field Details
-
HMAC_HEADER
- See Also:
-
-
Constructor Details
-
CSVBuilder
- Throws:
IOException
-
CSVBuilder
- Throws:
IOException
-
CSVBuilder
- Throws:
NoSuchAlgorithmExceptionIOException
-
-
Method Details
-
getHMacKey
returns the used hmac key as hex string- Returns:
- the mac key as hex string
-
addRow
public CSVBuilder addRow(String[] row) throws NoSuchAlgorithmException, InvalidKeyException, IOException add a row to the csv buffer- Parameters:
row-- Returns:
- Throws:
NoSuchAlgorithmExceptionInvalidKeyExceptionIOException
-
build
build the csv buffer- Returns:
- the csv buffer as string
- Throws:
IOException- if the buffer could not be built
-
writeToFile
write the csv buffer to a file- Parameters:
path- the path to the file- Returns:
- the file
- Throws:
IOException- if the file could not be written
-