Get file system from .iso doesn't work using loopy and common vfs. (JAVA) -
i need read(only) file scheme .iso file. utilize "commons-vfs" (pre vfs2 package) , "loopy" plugin so. (lack of examples , absolutely no documentation loopy, makes lot harder understand todo)
this exception thrown if start application:
exception in thread "awt-eventqueue-0" java.lang.abstractmethoderror: org.apache.commons.vfs.provider.abstractlayeredfileprovider.parseuri(ljava/lang/string;)lorg/apache/commons/vfs/filename; @ org.apache.commons.vfs.provider.abstractlayeredfileprovider.findfile(abstractlayeredfileprovider.java:48) @ org.apache.commons.vfs.impl.defaultfilesystemmanager.resolvefile(defaultfilesystemmanager.java:505) @ org.apache.commons.vfs.impl.defaultfilesystemmanager.resolvefile(defaultfilesystemmanager.java:483) @ org.apache.commons.vfs.impl.defaultfilesystemmanager.resolvefile(defaultfilesystemmanager.java:453) @ ddviewer.launcher.launcher.jbutton2actionperformed(launcher.java:145) @ ddviewer.launcher.launcher.access$200(launcher.java:24) @ ddviewer.launcher.launcher$3.actionperformed(launcher.java:74) @ javax.swing.abstractbutton.fireactionperformed(abstractbutton.java:2022) @ javax.swing.abstractbutton$handler.actionperformed(abstractbutton.java:2346) @ javax.swing.defaultbuttonmodel.fireactionperformed(defaultbuttonmodel.java:402) @ javax.swing.defaultbuttonmodel.setpressed(defaultbuttonmodel.java:259) @ javax.swing.plaf.basic.basicbuttonlistener.mousereleased(basicbuttonlistener.java:252) @ java.awt.component.processmouseevent(component.java:6527) @ javax.swing.jcomponent.processmouseevent(jcomponent.java:3321) @ java.awt.component.processevent(component.java:6292) @ java.awt.container.processevent(container.java:2234) @ java.awt.component.dispatcheventimpl(component.java:4883) @ java.awt.container.dispatcheventimpl(container.java:2292) @ java.awt.component.dispatchevent(component.java:4705) @ java.awt.lightweightdispatcher.retargetmouseevent(container.java:4898) @ java.awt.lightweightdispatcher.processmouseevent(container.java:4533) @ java.awt.lightweightdispatcher.dispatchevent(container.java:4462) @ java.awt.container.dispatcheventimpl(container.java:2278) @ java.awt.window.dispatcheventimpl(window.java:2739) @ java.awt.component.dispatchevent(component.java:4705) @ java.awt.eventqueue.dispatcheventimpl(eventqueue.java:746) @ java.awt.eventqueue.access$400(eventqueue.java:97) @ java.awt.eventqueue$3.run(eventqueue.java:697) @ java.awt.eventqueue$3.run(eventqueue.java:691) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$1.dointersectionprivilege(protectiondomain.java:75) @ java.security.protectiondomain$1.dointersectionprivilege(protectiondomain.java:86) @ java.awt.eventqueue$4.run(eventqueue.java:719) @ java.awt.eventqueue$4.run(eventqueue.java:717) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$1.dointersectionprivilege(protectiondomain.java:75) @ java.awt.eventqueue.dispatchevent(eventqueue.java:716) @ java.awt.eventdispatchthread.pumponeeventforfilters(eventdispatchthread.java:201) @ java.awt.eventdispatchthread.pumpeventsforfilter(eventdispatchthread.java:116) @ java.awt.eventdispatchthread.pumpeventsforhierarchy(eventdispatchthread.java:105) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:101) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:93) @ java.awt.eventdispatchthread.run(eventdispatchthread.java:82) code:
this.filesystemmanager = new defaultfilesystemmanager(); //global . . . file iso = new file(jtextfield_choseniso.gettext()); if (iso.exists()) { seek { this.filesystemmanager.addprovider("iso", new isofileprovider()); string filepath = iso.getabsolutepath(); filepath = filepath.replaceall("\\\\", "/"); system.out.println(filepath); isofileobject ifo = (isofileobject)this.filesystemmanager.resolvefile("iso:"+filepath); //do stuff } grab (filesystemexception ex) { logger.getlogger(launcher.class.getname()).log(level.severe, null, ex); } } any other way file scheme .iso files welcome. need infos .txt files contained in damn iso.
after importing jar in project (you can add together maven dependency loopy-vfs), can open file other apache mutual vfs:
import org.apache.commons.vfs.*; public class isoreader { public static void main(string[] args) throws filesystemexception { filesystemmanager fsmanager = vfs.getmanager(); fileobject isofile = fsmanager.resolvefile("iso:/path/to/file.iso"); } } after can utilize methods available fileobject. utilize resolvefile("file") 1 time again on isofile retrieve file within iso, , utilize getcontent() obtain filecontent object can read.
java iso
No comments:
Post a Comment