org.encog.util.http
public final class URLUtility extends Object
Modifier and Type | Field and Description |
---|---|
static String |
INDEX_FILE
The name of the usual default document.
|
static int |
SPECIAL_CHAR_LIMIT
Beyond this number are special chars.
|
Modifier and Type | Method and Description |
---|---|
static URL |
constructURL(URL base,
String url,
boolean stripRef)
Construct a URL from its basic parts.
|
static boolean |
containsInvalidURLCharacters(String url)
Returns true if the URL contains any invalid characters.
|
static String |
convertFilename(String base,
URL url,
boolean mkdir)
Convert a filename for local storage.
|
public static final int SPECIAL_CHAR_LIMIT
public static final String INDEX_FILE
public static URL constructURL(URL base, String url, boolean stripRef) throws IOException
base
- The base URL.url
- The URL that was found on the base URL's page.stripRef
- True if the URL's reference should be stripped.IOException
- Thrown if any IO error occurs.public static boolean containsInvalidURLCharacters(String url)
url
- The URL to be checked.public static String convertFilename(String base, URL url, boolean mkdir)
base
- The local path that forms the base of the downloaded web tree.url
- The URL path.mkdir
- Should the directory structure be created.Copyright © 2014. All Rights Reserved.