|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.File | +--org.juniverse.utils.TextFile
This class extends the class File.
usage:
read from Ascii-File: TextFile t = new TextFile("bob.txt"); String fileContent = t.getText(); write to Ascii-File: TextFile t = new TextFile("bob.txt"); t.setText("Hello drumedar!");
Field Summary |
Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
TextFile(java.io.File filename)
|
|
TextFile(java.lang.String filename)
|
Method Summary | |
java.lang.String |
getText()
returns the content of the Ascii-File |
void |
setText(java.lang.String body)
set the content of the Ascii-File |
Methods inherited from class java.io.File |
canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TextFile(java.io.File filename)
public TextFile(java.lang.String filename)
Method Detail |
public java.lang.String getText()
public void setText(java.lang.String body)
body
- new content of the File
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |