All Packages This Package Class Hierarchy Class Search Index
java.lang.Object
|
+----java.io.File
|
+----kh.io.LocalFileInfo
| Summary |
public class LocalFileInfo
extends java.io.File
implements kh.io.FileInfo
{
// Constructors 2
public LocalFileInfo(String);
public LocalFileInfo(LocalFileInfo, String);
// Methods 11
public FileInfo createChild(String, boolean) throws IOException;
public void deleteFile() throws IOException;
public FileInfo getChild(String) throws IOException;
public Enumeration getChildren() throws IOException;
public long getLength();
public Date getModDate();
public FileInfo getParentInfo();
public boolean isWritable();
public InputStream openInputStream() throws IOException;
public OutputStream openOutputStream() throws IOException;
public void renameFile(FileInfo) throws IOException;
}
This provides a FileInfo which understands local files
| Constructors |
· LocalFileInfo | Summary | Top |
public LocalFileInfo(String name)
· LocalFileInfo | Summary | Top |
public LocalFileInfo(LocalFileInfo parent,
String name)
| Methods |
· createChild | Summary | Top |
public FileInfo createChild(String name,
boolean isDirectory) throws IOException
Create a FileInfo with this FileInfo as the parent. The file is not yet created unless it is a directory. If not a directory, the file is created by openOutputStream.
- Implements:
- createChild in interface FileInfo
· deleteFile | Summary | Top |
public void deleteFile() throws IOException
Delete the specified file.
- Implements:
- deleteFile in interface FileInfo
· getChild | Summary | Top |
public FileInfo getChild(String name) throws IOException
Return a FileInfo which references a preexisting file or directory. Throws an exception if the file doesn't exist
- Implements:
- getChild in interface FileInfo
· getChildren | Summary | Top |
public Enumeration getChildren() throws IOException
Return an Enumeration of kh.io.FileInfo containing current directory contents
- Implements:
- getChildren in interface FileInfo
· getLength | Summary | Top |
public long getLength()
Return the number of bytes in this file
- Implements:
- getLength in interface FileInfo
· getModDate | Summary | Top |
public Date getModDate()
Return the mod date for this file
- Implements:
- getModDate in interface FileInfo
· getParentInfo | Summary | Top |
public FileInfo getParentInfo()
Return the parent directory of this file - or null if we were the root node
- Implements:
- getParentInfo in interface FileInfo
· isWritable | Summary | Top |
public boolean isWritable()
Return true if this file can be written to by the current user
- Implements:
- isWritable in interface FileInfo
· openInputStream | Summary | Top |
public InputStream openInputStream() throws IOException
Return a stream which can be used to read from this file. The caller is responsible closing the stream eventually. Throws an exception if this is not isFile().
- Implements:
- openInputStream in interface FileInfo
· openOutputStream | Summary | Top |
public OutputStream openOutputStream() throws IOException
Create a file with the specified name - returns the output stream which can be used to write to this file.
- Implements:
- openOutputStream in interface FileInfo
· renameFile | Summary | Top |
public void renameFile(FileInfo newName) throws IOException
Rename this file to the specified name
- Implements:
- renameFile in interface FileInfo
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7