List of usage examples for org.apache.commons.vfs.provider.url UrlFileNameParser UrlFileNameParser
public UrlFileNameParser()
From source file:org.pentaho.di.trans.steps.hadoopfileinput.HadoopFileInputMeta.java
public String getUrlPath(String incomingURL) { String path = null;// www. ja v a2s . com try { String noVariablesURL = incomingURL.replaceAll("[${}]", "/"); UrlFileNameParser parser = new UrlFileNameParser(); FileName fileName = parser.parseUri(null, null, noVariablesURL); String root = fileName.getRootURI(); path = incomingURL.substring(root.length() - 1); } catch (FileSystemException e) { path = null; } return path; }