List of usage examples for org.apache.commons.vfs FileName SEPARATOR_CHAR
char SEPARATOR_CHAR
To view the source code for org.apache.commons.vfs FileName SEPARATOR_CHAR.
Click Source Link
From source file:org.objectweb.proactive.extensions.vfsprovider.client.ProActiveFileNameParser.java
private static String extractServicePath(StringBuffer path) throws FileSystemException { if (path.length() > 0 && path.charAt(0) != FileName.SEPARATOR_CHAR) { throw new FileSystemException( "Invalid path in URI: service path after host name does not begin with slash"); }//from www. java2 s . c o m int idx = path.indexOf(ProActiveFileName.SERVICE_AND_FILE_PATH_SEPARATOR); if (idx == -1) { // simply assume that whole path is a service path final String servicePath = path.toString(); path.delete(0, path.length()); return servicePath; } final String servicePath = path.substring(0, idx); path.delete(0, idx + ProActiveFileName.SERVICE_AND_FILE_PATH_SEPARATOR.length()); return servicePath; }