CoderRightInTheProgram
CoderRightInTheProgram

Reputation: 127

Unzip a file and store contents into a String, without writing to files

I need to grab a file from an FTP, then unzip the file to get the 3 files inside, and store them each as a String (and maybe put them into a String Array).

I'm later going to use a stored procedure in SQL to save these String Files to a DB. I cannot write to the FTP, so extracting them into files first is not an option.

What's the best way to unzip these files into each their own String in Java?

Upvotes: 0

Views: 85

Answers (1)

Steve Kuo
Steve Kuo

Reputation: 63094

Chain ZipInputStream to an InputStreamReader then perhaps a BufferedReader.

Upvotes: 2

Related Questions