commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saurabh (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (VFS-394) java.io.EOFException: Unexpected end of ZLIB input stream
Date Fri, 25 Nov 2011 07:54:40 GMT

     [ https://issues.apache.org/jira/browse/VFS-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Saurabh updated VFS-394:
------------------------

    Description: 
am trying to read one line at a time using bufferedReader like following

{code}
final FileObject fileObject = new OnCallRefreshFileObject(VFS.getManager().resolveFile("Myfilepath"));
 BufferedReader br = new BufferedReader (new InputStreamReader(fileObject.getContent().getInputStream(),
"utf-8"));
 br.readLine();
{code}

and I am getting the following stack trace on calling br.readline().I am reading a zipped
csv file.


{code}
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.ZipFile$1.fill(ZipFile.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at org.apache.commons.vfs.util.MonitorInputStream.read(MonitorInputStream.java:74)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
{code}

and sometimes it gives me this exception
{code}
java.util.zip.ZipException: ZIP_Read: error reading zip file
	at java.util.zip.ZipFile.read(Native Method)
	at java.util.zip.ZipFile.access$1200(ZipFile.java:31)
	at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:460)
	at java.util.zip.ZipFile$1.fill(ZipFile.java:243)
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
	at org.apache.commons.vfs.util.MonitorInputStream.read(MonitorInputStream.java:74)
	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
	at java.io.InputStreamReader.read(InputStreamReader.java:167)
	at java.io.BufferedReader.fill(BufferedReader.java:136)
	at java.io.BufferedReader.readLine(BufferedReader.java:299)
	at java.io.BufferedReader.readLine(BufferedReader.java:362)
{code}


  was:
am trying to read one line at a time using bufferedReader like following

{code}
final FileObject fileObject = new OnCallRefreshFileObject(VFS.getManager().resolveFile("Myfilepath"));
 BufferedReader br = new BufferedReader (new InputStreamReader(fileObject.getContent().getInputStream(),
"utf-8"));
 br.readLine();
{code}

and I am getting the following stack trace on calling br.readline().I am reading a zipped
csv file.


{code}
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.ZipFile$1.fill(ZipFile.java:240)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at org.apache.commons.vfs.util.MonitorInputStream.read(MonitorInputStream.java:74)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
{code}


    
> java.io.EOFException: Unexpected end of ZLIB input stream
> ---------------------------------------------------------
>
>                 Key: VFS-394
>                 URL: https://issues.apache.org/jira/browse/VFS-394
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: windows
>            Reporter: Saurabh
>              Labels: vfs
>             Fix For: 1.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> am trying to read one line at a time using bufferedReader like following
> {code}
> final FileObject fileObject = new OnCallRefreshFileObject(VFS.getManager().resolveFile("Myfilepath"));
>  BufferedReader br = new BufferedReader (new InputStreamReader(fileObject.getContent().getInputStream(),
"utf-8"));
>  br.readLine();
> {code}
> and I am getting the following stack trace on calling br.readline().I am reading a zipped
csv file.
> {code}
> java.io.EOFException: Unexpected end of ZLIB input stream
> at java.util.zip.ZipFile$1.fill(ZipFile.java:240)
> at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
> at org.apache.commons.vfs.util.MonitorInputStream.read(MonitorInputStream.java:74)
> at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
> at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
> at java.io.InputStreamReader.read(InputStreamReader.java:167)
> at java.io.BufferedReader.fill(BufferedReader.java:136)
> at java.io.BufferedReader.readLine(BufferedReader.java:299)
> at java.io.BufferedReader.readLine(BufferedReader.java:362)
> {code}
> and sometimes it gives me this exception
> {code}
> java.util.zip.ZipException: ZIP_Read: error reading zip file
> 	at java.util.zip.ZipFile.read(Native Method)
> 	at java.util.zip.ZipFile.access$1200(ZipFile.java:31)
> 	at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:460)
> 	at java.util.zip.ZipFile$1.fill(ZipFile.java:243)
> 	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
> 	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> 	at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
> 	at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
> 	at org.apache.commons.vfs.util.MonitorInputStream.read(MonitorInputStream.java:74)
> 	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
> 	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
> 	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
> 	at java.io.InputStreamReader.read(InputStreamReader.java:167)
> 	at java.io.BufferedReader.fill(BufferedReader.java:136)
> 	at java.io.BufferedReader.readLine(BufferedReader.java:299)
> 	at java.io.BufferedReader.readLine(BufferedReader.java:362)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message