@Override
    public Resource createRelative(String relativePath) throws IOException {
        if (!relativePath.startsWith(".") && relativePath.contains("/")) {
            try {
                return new VfsResource(VfsUtils.getChild(this.resource, relativePath));
            } catch (IOException ex) {
                // fall back to getRelative
            }
        }

        return new VfsResource(VfsUtils.getRelative(new URL(getURL(), relativePath)));
    }
Create a new {@code VfsResource} wrapping the given resource handle.

@param resource a {@code org.jboss.vfs.VirtualFile} instance
                (untyped in order to avoid a static dependency on the VFS API)
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/io/VfsResource.java