"java.io.IOException: Stream closed" is thrown if file name contains 
nonbreaking space (0x00A0)
-----------------------------------------------------------------------------------------------

                 Key: VFS-362
                 URL: https://issues.apache.org/jira/browse/VFS-362
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.0
         Environment: Java: jdk1.6.0_24

            Reporter: M Martin


If filename of file in zip archive contains nonbreaking space (0x00A0).
During reading archive exception "java.io.IOException: Stream closed" is thrown.

Stack trace:

Exception in thread "main" java.io.IOException: Stream closed
        at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:134)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
        at 
org.apache.commons.vfs.util.MonitorInputStream.read(MonitorInputStream.java:75)
        at java.io.FilterInputStream.read(FilterInputStream.java:90)


Source code:

for (FileObject fo:fObjs)
{
...
is = fo.getContent().getInputStream();
...
while ((length = is.read(bytes)) >= 0)  --> Exception is thrown
...             
}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to