Wrap the ZipInputStream with an InputStreamReader to convert from bytes to chars; then call inputStreamReader.read(char[] buf, int offset, int length) to fill your char[] buffer, like this:
//part of the code
MultipartFormDataRequest multiPartRequest = null;
Hashtable files = multiPartRequest.getFiles();
UploadFile userFile = (UploadFile)files.get("bootstrap_file");
InputStream input = userFile.getInpuStream();
ZipInputStream zin = new ZipInputStream(input);
// wrap the ZipInputStream with an InputStreamReader
InputStreamReader isr = new InputStreamReader(zin);
ZipEntry ze;
// ZipEntry ze gives you access to the filename etc of the entry in the zipfile you are currently handling
while ((ze = zin.getNextEntry()) != null) {
// create a buffer to hold the entire contents of this entry
char[] buf = new char[(int)ze.getSize()];
// read the contents into the buffer
isr.read(buf);
// feed the char[] to CSVReader
CSVReader reader = new CSVReader(CharArrayRead(buf));
}
if your CharArrayRead is actually a java.io.CharArrayReader, then there is no need to load it into a char[] and you'd be better off with code like this:
InputStreamReader isr = new InputStreamReader(zin);
BufferedReader br = new BufferedReader(isr);
ZipEntry ze;
while ((ze = zin.getNextEntry()) != null) {
CSVReader reader = new CSVReader(br);
}
If you just have a single zipped file (trying to get around the 1MB limitation) then this will work:
InputStreamReader isr = new InputStreamReader(zin);
zip.getNextEntry();
CSVReader reader = new CSVReader(isr, ...);