Package gov.nasa.arc.pds.tools.util
Class URLUtils
- java.lang.Object
- 
- gov.nasa.arc.pds.tools.util.URLUtils
 
- 
 public class URLUtils extends java.lang.ObjectThis class provides utilities for URL manipulation.- Author:
- jagander
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.util.List<java.lang.String>TEXT_CONTENT_TYPES
 - 
Constructor SummaryConstructors Constructor Description URLUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanexists(java.net.URI uri)static booleanexists(java.net.URL url)static java.net.URLgetAlternateCaseURL(java.net.URL url)static java.net.URLgetCaseUnknownURL(java.net.URI root, java.lang.String path)static java.net.URLgetCaseUnknownURL(java.net.URL url)static java.net.URLgetCaseUnknownURL(java.net.URL root, java.lang.String path)static java.lang.StringgetCharset(java.lang.String contentType, java.lang.String defaultCharset)static java.lang.StringgetCharset(java.net.URLConnection connection, java.lang.String defaultCharset)static URLContentsContainergetContent(java.net.URL url)static URLContentsContainergetContent(java.net.URL url, long maxLength)static intgetContentLength(java.net.URL url)static java.lang.StringgetContentType(java.net.URL url)static java.lang.StringgetContentType(java.net.URLConnection connection, java.net.URL url, java.io.InputStream is)static java.lang.StringgetFileName(java.lang.String url)static java.lang.StringgetFileName(java.net.URI uri)static java.lang.StringgetFileName(java.net.URL url)static java.net.URLgetParentURL(java.net.URI uri)static java.net.URLgetParentURL(java.net.URL url)static java.lang.StringgetParentURLString(java.net.URL url)static java.net.URLnewURL(java.net.URL base, java.lang.String filename)
 
- 
- 
- 
Method Detail- 
existspublic static boolean exists(java.net.URI uri) 
 - 
existspublic static boolean exists(java.net.URL url) 
 - 
getAlternateCaseURLpublic static java.net.URL getAlternateCaseURL(java.net.URL url) 
 - 
getCaseUnknownURLpublic static java.net.URL getCaseUnknownURL(java.net.URL url) 
 - 
getCaseUnknownURLpublic static java.net.URL getCaseUnknownURL(java.net.URI root, java.lang.String path)
 - 
getCaseUnknownURLpublic static java.net.URL getCaseUnknownURL(java.net.URL root, java.lang.String path)
 - 
getFileNamepublic static java.lang.String getFileName(java.lang.String url) 
 - 
getFileNamepublic static java.lang.String getFileName(java.net.URI uri) 
 - 
getFileNamepublic static java.lang.String getFileName(java.net.URL url) 
 - 
getParentURLStringpublic static java.lang.String getParentURLString(java.net.URL url) 
 - 
getParentURLpublic static java.net.URL getParentURL(java.net.URL url) 
 - 
getParentURLpublic static java.net.URL getParentURL(java.net.URI uri) 
 - 
getContentpublic static URLContentsContainer getContent(java.net.URL url, long maxLength) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
getContentpublic static URLContentsContainer getContent(java.net.URL url) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
getContentTypepublic static java.lang.String getContentType(java.net.URL url) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getContentTypepublic static java.lang.String getContentType(java.net.URLConnection connection, java.net.URL url, java.io.InputStream is)
 - 
getCharsetpublic static java.lang.String getCharset(java.net.URLConnection connection, java.lang.String defaultCharset)
 - 
getCharsetpublic static java.lang.String getCharset(java.lang.String contentType, java.lang.String defaultCharset)
 - 
getContentLengthpublic static int getContentLength(java.net.URL url) 
 - 
newURLpublic static java.net.URL newURL(java.net.URL base, java.lang.String filename) throws java.net.MalformedURLException- Throws:
- java.net.MalformedURLException
 
 
- 
 
-