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