public class FileUtilities
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
exist(java.net.URL url)
Return true if the file or the resource denoted by this URL exist.
|
static java.net.URL |
getChildURL(java.net.URL parentURL,
java.lang.String path)
Return an URL by its relative path from a parent URL.
|
static java.net.URL |
getChildURL(java.net.URL parentURL,
java.lang.String path,
boolean filterExistingURLs)
Return an URL by its relative path from a parent URL.
|
static java.lang.String |
getExtension(java.io.File file) |
static java.lang.String |
getExtension(java.lang.String src) |
static java.lang.String |
getExtension(java.net.URL url) |
static java.lang.String |
getFileNameBody(java.io.File file)
Return the body name of a File (before the extension if there is an
extension, else this is the name of the file itself).
|
static java.lang.String |
getFileNameBody(java.net.URL url)
Return the body name of an URL.
|
static java.net.URL |
getParentURL(java.net.URL url)
Return the parent URL of a given URL.
|
static java.net.URL |
getParentURL(java.net.URL url,
boolean endSeparator)
Return the parent URL of a given URL.
|
public static java.net.URL getChildURL(java.net.URL parentURL,
java.lang.String path)
parentURL - the parent URLpath - the path of the child relative to the parentpublic static java.net.URL getChildURL(java.net.URL parentURL,
java.lang.String path,
boolean filterExistingURLs)
parentURL - the parent URLpath - the path of the child relative to the parentfilterExistingURLs - if true, remove not existing URLs from the listpublic static boolean exist(java.net.URL url)
url - the URLpublic static java.net.URL getParentURL(java.net.URL url)
url - the URLpublic static java.net.URL getParentURL(java.net.URL url,
boolean endSeparator)
url - the URLendSeparator - true if an end separator ("/") must be added at the end of the parent pathpublic static java.lang.String getFileNameBody(java.io.File file)
file - the filepublic static java.lang.String getFileNameBody(java.net.URL url)
url - the urlpublic static java.lang.String getExtension(java.io.File file)
public static java.lang.String getExtension(java.net.URL url)
public static java.lang.String getExtension(java.lang.String src)
Copyright © 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence