I have some strings that represent lines in a CSV:
String headers = "Date,Color,Model,Price";
String line1 = "12-03-2012,Red,Toyota,13500";
I want to return a bytestream that would correspond to the corresponding csv file. I've seen how to convert csv files to strings (using InputStream
and BufferedReader
), but not the reverse operation. Any help would be appreciated!