|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.text.Path
public abstract class Path
A generalized path/location, including File and URIs.
Field Summary | |
---|---|
static Path |
defaultPath
|
static FilePath |
userDirPath
This is equivalent to the System "user.dir property. |
Constructor Summary | |
---|---|
protected |
Path()
|
Method Summary | |
---|---|
static Path |
coerceToPathOrNull(java.lang.Object path)
|
static Path |
currentPath()
|
boolean |
delete()
|
boolean |
exists()
|
Path |
getAbsolute()
|
java.lang.String |
getAuthority()
|
Path |
getCanonical()
|
java.lang.CharSequence |
getCharContent(boolean ignoreEncodingErrors)
|
long |
getContentLength()
|
Path |
getDirectory()
|
java.lang.String |
getExtension()
|
java.lang.String |
getFragment()
|
java.lang.String |
getHost()
|
java.lang.String |
getLast()
|
abstract long |
getLastModified()
|
java.lang.String |
getName()
|
Path |
getParent()
|
abstract java.lang.String |
getPath()
|
int |
getPort()
|
java.lang.String |
getQuery()
|
abstract java.lang.String |
getScheme()
|
java.lang.String |
getUserInfo()
|
abstract boolean |
isAbsolute()
|
boolean |
isDirectory()
Does this path name a directory? The default implementation returns true only if the path ends with '/' or the separatorChar. |
abstract java.io.InputStream |
openInputStream()
|
static java.io.InputStream |
openInputStream(java.lang.Object uri)
|
abstract java.io.OutputStream |
openOutputStream()
|
java.io.Reader |
openReader(boolean ignoreEncodingErrors)
|
java.io.Writer |
openWriter()
|
static java.lang.String |
relativize(java.lang.String in,
java.lang.String base)
Convert an absolute URI to one relatve to a given base. |
Path |
resolve(Path relative)
|
abstract Path |
resolve(java.lang.String relative)
|
static void |
setCurrentPath(Path path)
|
abstract java.net.URI |
toUri()
|
java.net.URI |
toURI()
|
java.lang.String |
toURIString()
|
abstract java.net.URL |
toURL()
|
static java.net.URL |
toURL(java.lang.String str)
|
static int |
uriSchemeLength(java.lang.String uri)
Helper routine to get the scheme part of a URI. |
static boolean |
uriSchemeSpecified(java.lang.String name)
Tests if a URL has a scheme. |
static Path |
valueOf(java.lang.Object arg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final FilePath userDirPath
"user.dir
property.
However, the getProperty is tracked dynamically and resolved
as needed.
public static Path defaultPath
Constructor Detail |
---|
protected Path()
Method Detail |
---|
public static Path currentPath()
public static void setCurrentPath(Path path)
public static Path coerceToPathOrNull(java.lang.Object path)
public static Path valueOf(java.lang.Object arg)
public static java.net.URL toURL(java.lang.String str)
public static int uriSchemeLength(java.lang.String uri)
public static boolean uriSchemeSpecified(java.lang.String name)
public abstract boolean isAbsolute()
public boolean isDirectory()
public boolean delete()
public boolean exists()
public abstract long getLastModified()
public long getContentLength()
public abstract java.lang.String getScheme()
public java.lang.String getAuthority()
public java.lang.String getUserInfo()
public java.lang.String getHost()
public abstract java.lang.String getPath()
public Path getDirectory()
public Path getParent()
public java.lang.String getLast()
public java.lang.String getExtension()
public int getPort()
public java.lang.String getQuery()
public java.lang.String getFragment()
public abstract java.net.URL toURL()
public abstract java.net.URI toUri()
public final java.net.URI toURI()
public java.lang.String toURIString()
public Path resolve(Path relative)
public abstract Path resolve(java.lang.String relative)
public static java.io.InputStream openInputStream(java.lang.Object uri) throws java.io.IOException
java.io.IOException
public abstract java.io.InputStream openInputStream() throws java.io.IOException
java.io.IOException
public abstract java.io.OutputStream openOutputStream() throws java.io.IOException
java.io.IOException
public java.io.Reader openReader(boolean ignoreEncodingErrors) throws java.io.IOException
java.io.IOException
public java.io.Writer openWriter() throws java.io.IOException
java.io.IOException
public java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors) throws java.io.IOException
java.io.IOException
public static java.lang.String relativize(java.lang.String in, java.lang.String base) throws java.net.URISyntaxException, java.io.IOException
java.net.URISyntaxException
java.io.IOException
public java.lang.String getName()
public Path getAbsolute()
public Path getCanonical()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |