Package gov.nasa.arc.pds.tools.util
Class URLUtils
java.lang.Object
gov.nasa.arc.pds.tools.util.URLUtils
public class URLUtils extends Object
This class provides utilities for URL manipulation.
- Author:
- jagander
-
Field Summary
Fields Modifier and Type Field Description static List<String>TEXT_CONTENT_TYPES -
Constructor Summary
Constructors Constructor Description URLUtils() -
Method Summary
Modifier and Type Method Description static booleanexists(URI uri)static booleanexists(URL url)static URLgetAlternateCaseURL(URL url)static URLgetCaseUnknownURL(URI root, String path)static URLgetCaseUnknownURL(URL url)static URLgetCaseUnknownURL(URL root, String path)static StringgetCharset(String contentType, String defaultCharset)static StringgetCharset(URLConnection connection, String defaultCharset)static URLContentsContainergetContent(URL url)static URLContentsContainergetContent(URL url, long maxLength)static intgetContentLength(URL url)static StringgetContentType(URL url)static StringgetContentType(URLConnection connection, URL url, InputStream is)static StringgetFileName(String url)static StringgetFileName(URI uri)static StringgetFileName(URL url)static URLgetParentURL(URI uri)static URLgetParentURL(URL url)static StringgetParentURLString(URL url)static URLnewURL(URL base, String filename)
-
Field Details
-
TEXT_CONTENT_TYPES
-
-
Constructor Details
-
URLUtils
public URLUtils()
-
-
Method Details
-
exists
-
exists
-
getAlternateCaseURL
-
getCaseUnknownURL
-
getCaseUnknownURL
-
getCaseUnknownURL
-
getFileName
-
getFileName
-
getFileName
-
getParentURLString
-
getParentURL
-
getParentURL
-
getContent
- Throws:
IOException
-
getContent
- Throws:
IOException
-
getContentType
- Throws:
IOException
-
getContentType
-
getCharset
-
getCharset
-
getContentLength
-
newURL
- Throws:
MalformedURLException
-