Package gov.nasa.arc.pds.tools.util
Class URLUtils
java.lang.Object
gov.nasa.arc.pds.tools.util.URLUtils
This class provides utilities for URL manipulation.
- Author:
- jagander
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanstatic 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 URL
-
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
-