[
https://jira.jboss.org/jira/browse/JBVFS-147?page=com.atlassian.jira.plug...
]
John Bailey commented on JBVFS-147:
-----------------------------------
When a URL points to a directory, you can not call InputStream.read and expect to get
bytes back. Once the JAR is mounted in VFS it becomes a directory.
If you need this to act as a File, then either:
1. Don't mount and use a JarFile
2. When mounting, retain the MountHandle and call getMountSource to get a handle to the
actual file
Cannot read from vfs: protocol URL
----------------------------------
Key: JBVFS-147
URL:
https://jira.jboss.org/jira/browse/JBVFS-147
Project: JBoss VFS
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.0.0.CR3
Reporter: Thomas Diesler
Assignee: John Bailey
Fix For: 3.0.0.CR4
Cannot read bytes from vfs: protocol URL
URL url = new
URL("vfs:/home/tdiesler/svn/jboss-osgi/projects/testing/trunk/target/test-libs/example-simple.jar/");
URLConnection con = (URLConnection)url.openConnection();
InputStream inputStream = con.getInputStream();
int read = inputStream.read();
read is -1
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira