|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.File org.apache.wicket.util.file.File
public class File
Simple extension of File that adds an implementation of IModifiable for files. This allows the ModificationWatcher class to watch files for modification. The IModifiable.lastModifiedTime() method also returns a Time object with a more convenient API than either Date or a value in milliseconds.
Field Summary |
---|
Fields inherited from class java.io.File |
---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
---|---|
File(java.io.File file)
Construct. |
|
File(File parent,
java.lang.String child)
Constructor. |
|
File(java.io.File parent,
java.lang.String child)
Construct. |
|
File(java.lang.String pathname)
Constructor. |
|
File(java.lang.String parent,
java.lang.String child)
Constructor. |
|
File(java.net.URI uri)
Constructor. |
Method Summary | |
---|---|
File |
file(java.lang.String name)
|
java.lang.String |
getExtension()
|
Folder |
getParentFolder()
|
java.io.InputStream |
inputStream()
|
Time |
lastModifiedTime()
Returns a Time object representing the most recent time this file was modified. |
java.io.OutputStream |
outputStream()
Creates a buffered output stream that writes to this file. |
java.lang.Object |
readObject()
|
java.lang.String |
readString()
|
boolean |
remove()
|
void |
sync()
Force contents of file to physical storage |
java.lang.String |
toQuotedString()
|
int |
write(File file)
Writes the given file to this one |
int |
write(java.io.InputStream input)
Writes the given input stream to this file |
void |
write(java.lang.String string)
Write the given string to this file |
void |
writeObject(java.io.Serializable object)
|
Methods inherited from class java.io.File |
---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public File(File parent, java.lang.String child)
parent
- parentchild
- childpublic File(java.io.File parent, java.lang.String child)
parent
- parentchild
- childpublic File(java.io.File file)
file
- File from java.io packagepublic File(java.lang.String pathname)
pathname
- path namepublic File(java.lang.String parent, java.lang.String child)
parent
- parentchild
- childpublic File(java.net.URI uri)
uri
- file uriMethod Detail |
---|
public File file(java.lang.String name)
name
- Name of child file
public java.lang.String getExtension()
public Folder getParentFolder()
public java.io.InputStream inputStream() throws java.io.FileNotFoundException
java.io.FileNotFoundException
- Thrown if the file cannot be foundpublic Time lastModifiedTime()
lastModifiedTime
in interface IModifiable
null
if
that information is not availablepublic java.io.OutputStream outputStream() throws java.io.FileNotFoundException
java.io.FileNotFoundException
- Thrown if the file cannot be foundpublic java.lang.String readString() throws java.io.IOException
java.io.IOException
public java.lang.Object readObject() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void writeObject(java.io.Serializable object) throws java.io.IOException
object
- Object to write to this file
java.io.IOException
public boolean remove()
File.delete()
public void sync() throws java.io.IOException
java.io.IOException
public java.lang.String toQuotedString()
public int write(File file) throws java.io.IOException
file
- The file to copy
java.io.IOException
public int write(java.io.InputStream input) throws java.io.IOException
input
- The input
java.io.IOException
public void write(java.lang.String string) throws java.io.IOException
string
- The string to write
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |