public class TestFileManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
TEMP_DIR_PATH |
| Constructor and Description |
|---|
TestFileManager(String baseFilename,
String fileSuffix) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp() |
File |
createFile(File dir,
String filename,
String contents)
NOTE: the file content is written using platform encoding.
|
File |
createTempDir() |
File |
createTempFile() |
protected void |
finalize() |
String |
getFileContents(File file)
NOTE: the file content is read using platform encoding.
|
void |
markForDeletion(File toDelete) |
public static final String TEMP_DIR_PATH
public void markForDeletion(File toDelete)
public File createTempDir()
public File createTempFile() throws IOException
IOExceptionpublic void cleanUp()
public File createFile(File dir, String filename, String contents) throws IOException
IOExceptionpublic String getFileContents(File file) throws IOException
IOExceptionCopyright © 2002–2015 The Apache Software Foundation. All rights reserved.