Java Code Examples for org.apache.camel.util.FileUtil#compactPath()

The following examples show how to use org.apache.camel.util.FileUtil#compactPath() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private static String compact(String href, String scheme) {
    final String afterScheme = scheme != null ? StringHelper.after(href, scheme) : href;
    final String compacted = FileUtil.compactPath(afterScheme, '/');
    return compacted;
}
 
Example 2
public InputStream loadResourceAsStream(String uri) {
    IllegalArgumentAssertion.assertNotNull(uri, "uri");
    String resolvedName = FileUtil.compactPath(uri, '/');
    return classLoader.getResourceAsStream(resolvedName);
}
 
Example 3
public URL loadResourceAsURL(String uri) {
    IllegalArgumentAssertion.assertNotNull(uri, "uri");
    String resolvedName = FileUtil.compactPath(uri, '/');
    return classLoader.getResource(resolvedName);
}