public class URLUtils extends Object
Modifier and Type | Field and Description |
---|---|
static List<String> |
TEXT_CONTENT_TYPES |
Constructor and Description |
---|
URLUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(URI uri) |
static boolean |
exists(URL url) |
static URL |
getAlternateCaseURL(URL url) |
static URL |
getCaseUnknownURL(URI root,
String path) |
static URL |
getCaseUnknownURL(URL url) |
static URL |
getCaseUnknownURL(URL root,
String path) |
static String |
getCharset(String contentType,
String defaultCharset) |
static String |
getCharset(URLConnection connection,
String defaultCharset) |
static URLContentsContainer |
getContent(URL url) |
static URLContentsContainer |
getContent(URL url,
long maxLength) |
static int |
getContentLength(URL url) |
static String |
getContentType(URL url) |
static String |
getContentType(URLConnection connection,
URL url,
InputStream is) |
static String |
getFileName(String url) |
static String |
getFileName(URI uri) |
static String |
getFileName(URL url) |
static URL |
getParentURL(URI uri) |
static URL |
getParentURL(URL url) |
static String |
getParentURLString(URL url) |
static URL |
newURL(URL base,
String filename) |
public static boolean exists(URI uri)
public static boolean exists(URL url)
public static URLContentsContainer getContent(URL url, long maxLength) throws IOException
IOException
public static URLContentsContainer getContent(URL url) throws IOException
IOException
public static String getContentType(URL url) throws IOException
IOException
public static String getContentType(URLConnection connection, URL url, InputStream is)
public static String getCharset(URLConnection connection, String defaultCharset)
public static int getContentLength(URL url)
public static URL newURL(URL base, String filename) throws MalformedURLException
MalformedURLException
Copyright © 2019. All rights reserved.