Files { public static File getLocalFileFromUrl(URL url) { final URL location = Args.notNull(url, "url"); return getLocalFileFromUrl(UrlDecoder.PATH_INSTANCE.decode(location.toExternalForm(), "UTF-8")); } private  Files(); static String basePath(final String path, final String extension); static String extension(final String path); static String filename(final String path); static boolean remove(final File file); static final boolean removeFolder(final File folder); static final int writeTo(final File file, final InputStream input); static final int writeTo(final File file, final InputStream input,
                                    final int bufSize); static final String cleanupFilename(final String filename); static File getLocalFileFromUrl(URL url); static File getLocalFileFromUrl(String url); static Time getLastModified(File file); static boolean mkdirs(File folder);  }
@Test public void fileWithWhitespace() throws Exception { URL url = new URL("file:/file%20with%20whitespace"); assertEquals(File.separator + "file with whitespace", Files.getLocalFileFromUrl(url).getPath()); }