|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.File
bsharp.fileio.EasyFile
public class EasyFile
A helper class to reading a writing files.
| Field Summary |
|---|
| Fields inherited from class java.io.File |
|---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary | |
|---|---|
EasyFile(java.io.File _file)
Create helper class given the filename. |
|
EasyFile(java.lang.String _filename)
Create helper class given the filename. |
|
| Method Summary | |
|---|---|
void |
closeAfterRead()
close file after writing. |
void |
closeAfterWrite()
close file after writing. |
void |
openForReading()
Open a file for reading. |
void |
openForWriting()
Open a file for writing. |
void |
openForWriting(boolean append)
Open a file for writing. |
java.lang.String |
readLine()
Read a line from the file. |
void |
write(java.lang.String s)
Write to the file. |
void |
writeln(java.lang.String s)
Write to the file. |
| 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 |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EasyFile(java.lang.String _filename)
filename - the file that may be written or read.public EasyFile(java.io.File _file)
filename - the file that may be written or read.| Method Detail |
|---|
public void openForReading()
name - public void openForWriting()
public void openForWriting(boolean append)
append - if true then append to the end of the file.public void write(java.lang.String s)
s - public void writeln(java.lang.String s)
s - public java.lang.String readLine()
public void closeAfterRead()
public void closeAfterWrite()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||