Package org.apache.groovy.nio.runtime
Class WritablePath
- java.lang.Object
-
- org.apache.groovy.nio.runtime.WritablePath
-
-
Constructor Summary
Constructors Constructor Description WritablePath(Path delegate)
WritablePath(Path delegate, String encoding)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
writeTo
public Writer writeTo(Writer out) throws IOException
Description copied from interface:Writable
Writes 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 is 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:
writeTo
in interfaceWritable
- 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
public FileSystem getFileSystem()
- Specified by:
getFileSystem
in interfacePath
-
isAbsolute
public boolean isAbsolute()
- Specified by:
isAbsolute
in interfacePath
-
getFileName
public Path getFileName()
- Specified by:
getFileName
in interfacePath
-
getNameCount
public int getNameCount()
- Specified by:
getNameCount
in interfacePath
-
startsWith
public boolean startsWith(Path other)
- Specified by:
startsWith
in interfacePath
-
startsWith
public boolean startsWith(String other)
- Specified by:
startsWith
in interfacePath
-
resolveSibling
public Path resolveSibling(Path other)
- Specified by:
resolveSibling
in interfacePath
-
resolveSibling
public Path resolveSibling(String other)
- Specified by:
resolveSibling
in interfacePath
-
relativize
public Path relativize(Path other)
- Specified by:
relativize
in interfacePath
-
toAbsolutePath
public Path toAbsolutePath()
- Specified by:
toAbsolutePath
in interfacePath
-
toRealPath
public Path toRealPath(LinkOption... options) throws IOException
- Specified by:
toRealPath
in interfacePath
- Throws:
IOException
-
register
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException
- Specified by:
register
in interfacePath
- Specified by:
register
in interfaceWatchable
- Throws:
IOException
-
register
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws IOException
- Specified by:
register
in interfacePath
- Specified by:
register
in interfaceWatchable
- Throws:
IOException
-
compareTo
public int compareTo(Path other)
- Specified by:
compareTo
in interfaceComparable<Path>
- Specified by:
compareTo
in interfacePath
-
equals
public boolean equals(Object other)
-
hashCode
public int hashCode()
-
-