public class Utility extends Object
Constructor and Description |
---|
Utility() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canRead(String url) |
static boolean |
canRead(URL url) |
static String |
fixSlashes(String sysid)
Replace backslashes with forward slashes.
|
static URL |
getParent(URL url) |
static boolean |
isDir(String url) |
static boolean |
isDir(URL url) |
static String |
makeAbsolute(String base,
String sysid)
Construct an absolute URI from a relative one, using the current
base URI.
|
static InputSource |
openConnection(URL url) |
static InputStream |
openConnection(URLConnection conn)
Method that opens a connection.
|
static String |
removeLastSlash(String url) |
static boolean |
supportXincludes()
Convenience method for disabling xinclude support throughout
the core library.
|
static List<URL> |
toURL(List<String> targets) |
static URL |
toURL(String target) |
public static InputStream openConnection(URLConnection conn) throws IOException
conn
- URL ConnectionIOException
- If an error occurred while opening
the stream.public static InputSource openConnection(URL url) throws IOException
IOException
public static List<URL> toURL(List<String> targets) throws MalformedURLException
MalformedURLException
public static URL toURL(String target) throws MalformedURLException
MalformedURLException
public static boolean isDir(String url)
public static boolean isDir(URL url)
public static boolean canRead(URL url)
public static boolean canRead(String url)
public static boolean supportXincludes()
public static String fixSlashes(String sysid)
sysid
- The input system identifier.public static String makeAbsolute(String base, String sysid) throws MalformedURLException
sysid
- The (possibly relative) system identifier#base
.MalformedURLException
Copyright © 2010–2018 Planetary Data System. All rights reserved.