Home » jakarta-jmeter-2.3.4_src » org.apache.jorphan.io » [javadoc | source]
org.apache.jorphan.io
public class: TextFile [javadoc | source]
java.lang.Object
   java.io.File
      org.apache.jorphan.io.TextFile

All Implemented Interfaces:
    Comparable, Serializable

Utility class to handle text files as a single lump of text.

Note this is just as memory-inefficient as handling a text file can be. Use with restraint.

Fields inherited from java.io.File:
separatorChar,  separator,  pathSeparatorChar,  pathSeparator,  $assertionsDisabled
Constructor:
 public TextFile(File filename) 
    Create a TextFile object to handle the named file with the platform default encoding.
    Parameters:
    filename - File to be read & written through this object.
 public TextFile(String filename) 
    Create a TextFile object to handle the named file with the platform default encoding.
    Parameters:
    filename - Name of the file to be read & written through this object.
 public TextFile(File filename,
    String encoding) 
    Create a TextFile object to handle the named file with the given encoding.
    Parameters:
    filename - File to be read & written through this object.
    encoding - Encoding to be used when reading & writing this file.
 public TextFile(String filename,
    String encoding) 
    Create a TextFile object to handle the named file with the given encoding.
    Parameters:
    filename - Name of the file to be read & written through this object.
    encoding - Encoding to be used when reading & writing this file.
Method from org.apache.jorphan.io.TextFile Summary:
getEncoding,   getText,   setEncoding,   setText
Methods from java.io.File:
canExecute,   canRead,   canWrite,   compareTo,   compareTo,   createNewFile,   createTempFile,   createTempFile,   delete,   deleteOnExit,   equals,   exists,   getAbsoluteFile,   getAbsolutePath,   getCanonicalFile,   getCanonicalPath,   getFreeSpace,   getName,   getParent,   getParentFile,   getPath,   getPrefixLength,   getTotalSpace,   getUsableSpace,   hashCode,   isAbsolute,   isDirectory,   isFile,   isHidden,   lastModified,   length,   list,   list,   listFiles,   listFiles,   listFiles,   listRoots,   mkdir,   mkdirs,   renameTo,   setExecutable,   setExecutable,   setLastModified,   setReadOnly,   setReadable,   setReadable,   setWritable,   setWritable,   toString,   toURI,   toURL
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jorphan.io.TextFile Detail:
 public String getEncoding() 
 public String getText() 
    Read the whole file content and return it as a string.
 public  void setEncoding(String string) 
 public  void setText(String body) 
    Create the file with the given string as content -- or replace it's content with the given string if the file already existed.