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
IOExceptionpublic void empty()
throws IOException
IOExceptionpublic URL toURL() throws MalformedURLException
MalformedURLExceptionpublic File[] listFiles()
public File createTempFile(String fileName) throws IOException
IOExceptionpublic File createEmptyTempFile(String fileName) throws IOException
IOExceptionpublic static byte[] getBinaryTestData(int howMuch)
public File createTempBinaryFile(String fileName, int size) throws IOException
IOExceptionpublic boolean isEmpty()
public void delete()
throws IOException
IOExceptionpublic File getDir()
public boolean containsFileName(String fileName)
"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"