Package org.web3d.vrml.util
Class URLChecker
java.lang.Object
org.web3d.vrml.util.URLChecker
A checker of URLs to update them and include a root URL if needed.
- Version:
- $Revision: 1.12 $
- Author:
- Justin Couch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
Check the given array of URLs for relative references and return a new array with the resulting urls.static void
checkURLsInPlace
(String worldURL, String[] urls, boolean anchor) Check the given array of URLs for relative references - in place.static String
prependFileScheme
(String url) Ensure that the proper URI scheme of file:/// is prepended to the given url if missing, or incomplete from a local file source.
-
Field Details
-
FILE_COLON
- See Also:
-
FILE_URI_SCHEME_NO_HOST
- See Also:
-
OS
-
IS_WIN
public static final boolean IS_WIN
-
-
Constructor Details
-
URLChecker
public URLChecker()
-
-
Method Details
-
checkURLs
Check the given array of URLs for relative references and return a new array with the resulting urls. If found, add the base URL to it to make them all fully qualified. This will also set the urlRelativeCheck flag to true.- Parameters:
worldURL
- the root URL to apply to the urlsurls
- The array of URLs to checkanchor
- true if we should apply extra checks for anchor URLs.- Returns:
- An array of updated URLs.
-
prependFileScheme
Ensure that the proper URI scheme of file:/// is prepended to the given url if missing, or incomplete from a local file source. Return URLs unchanged if the scheme is http:// or https://.- Parameters:
url
- the url to prepend the proper URI scheme to- Returns:
- a properly prepended URI scheme to a url
-
checkURLsInPlace
Check the given array of URLs for relative references - in place. If found, add the base URL to it to make them all fully qualified. This will also set the urlRelativeCheck flag to true.- Parameters:
worldURL
- the root URL to apply to the urlsurls
- The array of URLs to check and update if necessary.anchor
- true if we should apply extra checks for anchor URLs.
-