| java.lang.Object org.apache.jmeter.services.FileServer
FileServer | public class FileServer (Code) | | The point of this class is to provide thread-safe access to files, and to
provide some simplifying assumptions about where to find files and how to
name them. For instance, putting supporting files in the same directory as
the saved test plan file allows users to refer to the file with just it's
name - this FileServer class will find the file without a problem.
Eventually, I want all in-test file access to be done through here, with the
goal of packaging up entire test plans as a directory structure that can be
sent via rmi to remote servers (currently, one must make sure the remote
server has all support files in a relative-same location) and to package up
test plans to execute on unknown boxes that only have Java installed.
|
filesOpen | protected boolean filesOpen()(Code) | | |
getRandomFile | public File getRandomFile(String basedir, String[] extensions)(Code) | | Method will get a random file in a base directory
TODO hey, not sure this method belongs here. FileServer is for threadsafe
File access relative to current test's base directory.
Parameters: basedir - a random File from the basedir that matches one of the extensions |
readLine | public String readLine(String filename) throws IOException(Code) | | Get the next line of the named file, recycle by default.
Parameters: filename - String containing the next line in the file throws: IOException - |
readLine | public synchronized String readLine(String filename, boolean recycle) throws IOException(Code) | | Get the next line of the named file.
Parameters: filename - Parameters: recycle - - should file be restarted at EOF? String containing the next line in the file (null if EOF reached and not recycle) throws: IOException - |
reserveFile | public synchronized void reserveFile(String filename)(Code) | | Creates an association between a filename and a File inputOutputObject,
and stores it for later use - unless it is already stored.
Parameters: filename - - relative (to base) or absolute file name |
reserveFile | public synchronized void reserveFile(String filename, String charsetName)(Code) | | Creates an association between a filename and a File inputOutputObject,
and stores it for later use - unless it is already stored.
Parameters: filename - - relative (to base) or absolute file name Parameters: charsetName - - the character set encoding to use for the file |
|
|