public class URL extends Object
java.net.URL to improve usability.| Modifier and Type | Method and Description |
|---|---|
static URL |
createURL(String spec)
Creates java.net.URL with data protocol support.
|
Object |
getContent() |
Object |
getContent(Class<?>[] classes) |
URLConnection |
openConnection() |
public URL(String spec) throws MalformedURLException, URISyntaxException, InstantiationException, IllegalAccessException
public static final URL createURL(String spec) throws MalformedURLException, URISyntaxException, InstantiationException, IllegalAccessException
spec - the input URL as StringMalformedURLExceptionURISyntaxExceptionInstantiationExceptionIllegalAccessExceptionpublic URLConnection openConnection() throws IOException
IOExceptionpublic Object getContent() throws IOException
IOExceptionpublic Object getContent(Class<?>[] classes) throws IOException
IOExceptionCopyright © 2017–2022 Apache Software Foundation. All rights reserved.