org.codehaus.groovy.runtime
Class WritableFile

java.lang.Object
  extended byjava.io.File
      extended byorg.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

Field Summary
private  java.io.File delegate
           
private  java.lang.String encoding
           
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
WritableFile(java.io.File delegate)
           
WritableFile(java.io.File delegate, java.lang.String encoding)
           
 
Method Summary
 boolean canRead()
           
 boolean canWrite()
           
 int compareTo(java.io.File arg0)
           
 int compareTo(java.lang.Object arg0)
           
 boolean createNewFile()
           
 boolean delete()
           
 void deleteOnExit()
           
 boolean equals(java.lang.Object arg0)
           
 boolean exists()
           
 java.io.File getAbsoluteFile()
           
 java.lang.String getAbsolutePath()
           
 java.io.File getCanonicalFile()
           
 java.lang.String getCanonicalPath()
           
 java.lang.String getName()
           
 java.lang.String getParent()
           
 java.io.File getParentFile()
           
 java.lang.String getPath()
           
 int hashCode()
           
 boolean isAbsolute()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isHidden()
           
 long lastModified()
           
 long length()
           
 java.lang.String[] list()
           
 java.lang.String[] list(java.io.FilenameFilter arg0)
           
 java.io.File[] listFiles()
           
 java.io.File[] listFiles(java.io.FileFilter arg0)
           
 java.io.File[] listFiles(java.io.FilenameFilter arg0)
           
 boolean mkdir()
           
 boolean mkdirs()
           
 boolean renameTo(java.io.File arg0)
           
 boolean setLastModified(long arg0)
           
 boolean setReadOnly()
           
 java.lang.String toString()
           
 java.net.URI toURI()
           
 java.net.URL toURL()
           
 java.io.Writer writeTo(java.io.Writer out)
          writes this object to the given stream
 
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
 

Field Detail

delegate

private final java.io.File delegate

encoding

private final java.lang.String encoding
Constructor Detail

WritableFile

public WritableFile(java.io.File delegate)

WritableFile

public WritableFile(java.io.File delegate,
                    java.lang.String encoding)
Method Detail

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.