Package org.apache.groovy.nio.runtime
Class WritablePath
java.lang.Object
org.apache.groovy.nio.runtime.WritablePath
A Writable Path.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintbooleanbooleanbooleangetName(int index) intgetRoot()inthashCode()booleaniterator()register(WatchService watcher, WatchEvent.Kind<?>... events) register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) relativize(Path other) resolveSibling(String other) resolveSibling(Path other) booleanstartsWith(String other) booleanstartsWith(Path other) subpath(int beginIndex, int endIndex) toFile()toRealPath(LinkOption... options) toString()toUri()Writes this object to the given writer.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
WritablePath
- 
WritablePath
 
- 
- 
Method Details- 
writeToDescription copied from interface:WritableWrites this object to the given writer.This is used to defer content creation until the point when it is streamed to the output destination. Oftentimes, content will be defined but not necessarily created (as it may be the case with a Closure definition.) In that case, the output is then 'deferred' to the point when it is serialized to the writer. This class may be used whenever an object should be responsible for creating its own textual representation, but creating the entire output as a single String would be inefficient (such as outputting a multi-gigabyte XML document.) - Specified by:
- writeToin interface- Writable
- Parameters:
- out- the Writer to which this Writable should output its data.
- Returns:
- the Writer that was passed
- Throws:
- IOException- if an error occurred while outputting data to the writer
 
- 
getFileSystem- Specified by:
- getFileSystemin interface- Path
 
- 
isAbsolutepublic boolean isAbsolute()- Specified by:
- isAbsolutein interface- Path
 
- 
getRoot
- 
getFileName- Specified by:
- getFileNamein interface- Path
 
- 
getParent
- 
getNameCountpublic int getNameCount()- Specified by:
- getNameCountin interface- Path
 
- 
getName
- 
subpath
- 
startsWith- Specified by:
- startsWithin interface- Path
 
- 
startsWith- Specified by:
- startsWithin interface- Path
 
- 
endsWith
- 
endsWith
- 
normalize
- 
resolve
- 
resolve
- 
resolveSibling- Specified by:
- resolveSiblingin interface- Path
 
- 
resolveSibling- Specified by:
- resolveSiblingin interface- Path
 
- 
relativize- Specified by:
- relativizein interface- Path
 
- 
toUri
- 
toAbsolutePath- Specified by:
- toAbsolutePathin interface- Path
 
- 
toRealPath- Specified by:
- toRealPathin interface- Path
- Throws:
- IOException
 
- 
toFile
- 
registerpublic WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException - Specified by:
- registerin interface- Path
- Specified by:
- registerin interface- Watchable
- Throws:
- IOException
 
- 
register- Specified by:
- registerin interface- Path
- Specified by:
- registerin interface- Watchable
- Throws:
- IOException
 
- 
iterator
- 
compareTo- Specified by:
- compareToin interface- Comparable<Path>
- Specified by:
- compareToin interface- Path
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-