gnu.text
Class URIPath
java.lang.Object
gnu.text.Path
gnu.text.URIPath
- All Implemented Interfaces:
- java.lang.Comparable<URIPath>
- Direct Known Subclasses:
- URLPath
public class URIPath
- extends Path
- implements java.lang.Comparable<URIPath>
A Path that wraps a URI.
The URI can be a java.net.URI, or a String, if compiled without URI support.
| Methods inherited from class gnu.text.Path |
coerceToPathOrNull, currentPath, delete, getAbsolute, getCharContent, getDirectory, getExtension, getLast, getName, getParent, isDirectory, openInputStream, openReader, openWriter, relativize, resolve, setCurrentPath, toURI, toURL, uriSchemeLength, uriSchemeSpecified, valueOf |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
coerceToURIPathOrNull
public static URIPath coerceToURIPathOrNull(java.lang.Object path)
makeURI
public static URIPath makeURI(java.lang.Object arg)
valueOf
public static URIPath valueOf(java.net.URI uri)
valueOf
public static URIPath valueOf(java.lang.String uri)
isAbsolute
public boolean isAbsolute()
- Specified by:
isAbsolute in class Path
exists
public boolean exists()
- Overrides:
exists in class Path
getLastModified
public long getLastModified()
- Specified by:
getLastModified in class Path
getContentLength
public long getContentLength()
- Overrides:
getContentLength in class Path
toUri
public java.net.URI toUri()
- Specified by:
toUri in class Path
toURIString
public java.lang.String toURIString()
- Overrides:
toURIString in class Path
resolve
public Path resolve(java.lang.String rstr)
- Specified by:
resolve in class Path
compareTo
public int compareTo(URIPath path)
- Specified by:
compareTo in interface java.lang.Comparable<URIPath>
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
toURL
public java.net.URL toURL()
- Specified by:
toURL in class Path
openInputStream
public java.io.InputStream openInputStream()
throws java.io.IOException
- Specified by:
openInputStream in class Path
- Throws:
java.io.IOException
openOutputStream
public java.io.OutputStream openOutputStream()
throws java.io.IOException
- Specified by:
openOutputStream in class Path
- Throws:
java.io.IOException
getScheme
public java.lang.String getScheme()
- Specified by:
getScheme in class Path
getHost
public java.lang.String getHost()
- Overrides:
getHost in class Path
getAuthority
public java.lang.String getAuthority()
- Overrides:
getAuthority in class Path
getUserInfo
public java.lang.String getUserInfo()
- Overrides:
getUserInfo in class Path
getPort
public int getPort()
- Overrides:
getPort in class Path
getPath
public java.lang.String getPath()
- Specified by:
getPath in class Path
getQuery
public java.lang.String getQuery()
- Overrides:
getQuery in class Path
getFragment
public java.lang.String getFragment()
- Overrides:
getFragment in class Path
getCanonical
public Path getCanonical()
- Overrides:
getCanonical in class Path
encodeForUri
public static java.lang.String encodeForUri(java.lang.String str,
char mode)