java - Using OpenCSV to convert CSV file to XML using byte array in input -



java - Using OpenCSV to convert CSV file to XML using byte array in input -

i have question:

i'm trying convert csv file xml file , i'm seeing response of post: java lib or app convert csv xml file?

i see need utilize opencsv library , in particular, must utilize code:

csvreader reader = new csvreader(new filereader(startfile));

where string startfile = "./startdata.csv";

now, don't string startfile, have byte[] because, other question, have convert file in byte[]. how can utilize code byte[]?

are there alternatives?

thanks

since csvreader's constructor takes reader parameter, can pretty much pass that's readable it.

so in case, may seek using bytes stream reader, in:

csvreader reader = new csvreader( new inputstreamreader( new bytearrayinputstream(yourbytearray)));

java xml parsing converter opencsv

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -