Requirements
Downlading a CSV File
Code
I have a csvFormattedString like
String csvFormattedString = "\"Column_One\",\"Column_Two\"\n\"Row_Col1\",\"Row_Col2\"\n";
This CSV String is written to the reponse print writer using
response.getWriter().write(csvFormattedString);
I have set the headers as application-force-download and have set the charcter encoding to UTF-8.
I would like to send the response length back to the user as well.
The csvFormattedString.length()
does not seem to be correct as some my characters get truncated