org.codehaus.groovy.runtime
Class WritableFile
java.lang.Object
java.io.File
org.codehaus.groovy.runtime.WritableFile
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable, Writable
- public class WritableFile
- extends java.io.File
- implements Writable
A Writable File.
- Author:
- John Wilson
- See Also:
- Serialized Form
Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
Methods inherited from class java.io.File |
createTempFile, createTempFile, listRoots |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
delegate
private final java.io.File delegate
encoding
private final java.lang.String encoding
WritableFile
public WritableFile(java.io.File delegate)
WritableFile
public WritableFile(java.io.File delegate,
java.lang.String encoding)
writeTo
public java.io.Writer writeTo(java.io.Writer out)
throws java.io.IOException
- Description copied from interface:
Writable
- writes this object to the given stream
- Specified by:
writeTo
in interface Writable
- Throws:
java.io.IOException
canRead
public boolean canRead()
canWrite
public boolean canWrite()
compareTo
public int compareTo(java.io.File arg0)
compareTo
public int compareTo(java.lang.Object arg0)
- Specified by:
compareTo
in interface java.lang.Comparable
createNewFile
public boolean createNewFile()
throws java.io.IOException
- Throws:
java.io.IOException
delete
public boolean delete()
deleteOnExit
public void deleteOnExit()
equals
public boolean equals(java.lang.Object arg0)
exists
public boolean exists()
getAbsoluteFile
public java.io.File getAbsoluteFile()
getAbsolutePath
public java.lang.String getAbsolutePath()
getCanonicalFile
public java.io.File getCanonicalFile()
throws java.io.IOException
- Throws:
java.io.IOException
getCanonicalPath
public java.lang.String getCanonicalPath()
throws java.io.IOException
- Throws:
java.io.IOException
getName
public java.lang.String getName()
getParent
public java.lang.String getParent()
getParentFile
public java.io.File getParentFile()
getPath
public java.lang.String getPath()
hashCode
public int hashCode()
isAbsolute
public boolean isAbsolute()
isDirectory
public boolean isDirectory()
isFile
public boolean isFile()
isHidden
public boolean isHidden()
lastModified
public long lastModified()
length
public long length()
list
public java.lang.String[] list()
list
public java.lang.String[] list(java.io.FilenameFilter arg0)
listFiles
public java.io.File[] listFiles()
listFiles
public java.io.File[] listFiles(java.io.FileFilter arg0)
listFiles
public java.io.File[] listFiles(java.io.FilenameFilter arg0)
mkdir
public boolean mkdir()
mkdirs
public boolean mkdirs()
renameTo
public boolean renameTo(java.io.File arg0)
setLastModified
public boolean setLastModified(long arg0)
setReadOnly
public boolean setReadOnly()
toString
public java.lang.String toString()
toURI
public java.net.URI toURI()
toURL
public java.net.URL toURL()
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
Copyright © 2003-2005 The Codehaus. All Rights Reserved.