public final class URLUtil extends Object
Modifier and Type | Method and Description |
---|---|
static InputStream |
inputStreamFromURL(URL url)
Method that tries to get a stream (ideally, optimal one) to read from
the specified URL.
|
static OutputStream |
outputStreamFromURL(URL url)
Method that tries to get a stream (ideally, optimal one) to write to
the resource specified by given URL.
|
static URL |
toURL(File f)
Helper method that will convert given file into equivalent URL.
|
static URI |
uriFromSystemId(String sysId) |
static URL |
urlFromCurrentDir()
Method that tries to create and return URL that denotes current
working directory.
|
static URL |
urlFromSystemId(String sysId)
Method that tries to figure out how to create valid URL from a system
id, without additional contextual information.
|
static URL |
urlFromSystemId(String sysId,
URL ctxt) |
public static URL urlFromSystemId(String sysId) throws IOException
IOException
public static URI uriFromSystemId(String sysId) throws IOException
IOException
public static URL urlFromSystemId(String sysId, URL ctxt) throws IOException
IOException
public static URL urlFromCurrentDir() throws IOException
IOException
public static InputStream inputStreamFromURL(URL url) throws IOException
IOException
public static OutputStream outputStreamFromURL(URL url) throws IOException
IOException
public static URL toURL(File f) throws IOException
File.toURL()
method.IOException
Copyright © 2012–2015 FasterXML. All rights reserved.