File (final File baseDir, final String baseUrl, final String fullUrl) { assert fullUrl.startsWith(baseUrl); final String part = fullUrl.substring(baseUrl.length()).replace('/', File.separatorChar).replace('\\', File.separatorChar); return new File(baseDir, part); }