public class TempDirectory extends Object
Note the finalize method, which should delete the directory when this object is garbage collected.
Constructor and Description |
---|
TempDirectory(String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsFileName(String fileName) |
File |
createEmptyTempFile(String fileName) |
File |
createTempBinaryFile(String fileName,
int size)
Create a dummy binary file.
|
File |
createTempFile(String fileName)
This is useful for tests - specifically the one in com.day.io.htmlparser.TextContentListener,
which creates files, downloads them, and then checks them.
|
void |
delete() |
void |
empty() |
static byte[] |
getBinaryTestData(int howMuch) |
File |
getDir() |
boolean |
isEmpty() |
File[] |
listFiles() |
String |
toString() |
URL |
toURL()
This is taken from the JDK 1.2 File class
|
public TempDirectory(String name) throws IOException
IOException
public void empty() throws IOException
IOException
public URL toURL() throws MalformedURLException
MalformedURLException
public File[] listFiles()
public File createTempFile(String fileName) throws IOException
IOException
public File createEmptyTempFile(String fileName) throws IOException
IOException
public static byte[] getBinaryTestData(int howMuch)
public File createTempBinaryFile(String fileName, int size) throws IOException
IOException
public boolean isEmpty()
public void delete() throws IOException
IOException
public File getDir()
public boolean containsFileName(String fileName)
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"