Thanks for the reply.
The same thing when i am trying with below code snippet it is working
ZipFile zip=new ZipFile(new File("Y2012071.EDI.zip"));
Enumeration enum1=zip.entries();
while(enum1.hasMoreElements()){
ZipEntry ze=(ZipEntry)enum1.nextElement();
BufferedReader br = new BufferedReader(
new InputStreamReader(zip.getInputStream(ze)));
String line;
int linNum = 1;
while ((line = br.readLine()) != null) {
System.out.println(linNum);
linNum++;
}
Both getting InputStream from ZipFile or creating new ZipInputStream uses Inflater class for decompressing the data.
But i am getting error when i use ZipInputStream and not in case when i get inputstream using ZipFile.getInputStream.
Moreover it is reading the records and giving error before 15 records to EOF.
Will also check apache commons compress api