List of usage examples for org.apache.commons.vfs2 Capability DISPATCHER
Capability DISPATCHER
To view the source code for org.apache.commons.vfs2 Capability DISPATCHER.
Click Source Link
From source file:org.apache.commons.vfs2.example.Shell.java
private void info(String[] cmd) throws Exception { if (cmd.length > 1) { info(cmd[1]);//w w w .j av a 2s . c om } else { System.out.println("Default manager: \"" + mgr.getClass().getName() + "\" " + "version " + getVersion(mgr.getClass())); String[] schemes = mgr.getSchemes(); List<String> virtual = new ArrayList<String>(); List<String> physical = new ArrayList<String>(); for (int i = 0; i < schemes.length; i++) { Collection<Capability> caps = mgr.getProviderCapabilities(schemes[i]); if (caps != null) { if (caps.contains(Capability.VIRTUAL) || caps.contains(Capability.COMPRESS) || caps.contains(Capability.DISPATCHER)) { virtual.add(schemes[i]); } else { physical.add(schemes[i]); } } } if (!physical.isEmpty()) { System.out.println(" Provider Schemes: " + physical); } if (!virtual.isEmpty()) { System.out.println(" Virtual Schemes: " + virtual); } } }
From source file:tain.kr.test.vfs.v01.Shell.java
private void info(String[] cmd) throws Exception { if (cmd.length > 1) { info(cmd[1]);// w ww .ja v a 2 s . c om } else { System.out.println("Default manager: \"" + mgr.getClass().getName() + "\" " + "version " + getVersion(mgr.getClass())); String[] schemes = mgr.getSchemes(); List<String> virtual = new ArrayList<String>(); List<String> physical = new ArrayList<String>(); for (int i = 0; i < schemes.length; i++) { Collection<Capability> caps = mgr.getProviderCapabilities(schemes[i]); if (caps != null) { if (caps.contains(Capability.VIRTUAL) || caps.contains(Capability.COMPRESS) || caps.contains(Capability.DISPATCHER)) { virtual.add(schemes[i]); } else { physical.add(schemes[i]); } } } if (!physical.isEmpty()) { System.out.println(" Provider Schemes: " + physical); } if (!virtual.isEmpty()) { System.out.println(" Virtual Schemes: " + virtual); } } }