public class TempDirectory
extends java.lang.Object
Note the finalize method, which should delete the directory when this object is garbage collected.
Constructor and Description |
---|
TempDirectory(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsFileName(java.lang.String fileName) |
java.io.File |
createEmptyTempFile(java.lang.String fileName) |
java.io.File |
createTempBinaryFile(java.lang.String fileName,
int size)
Create a dummy binary file.
|
java.io.File |
createTempFile(java.lang.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) |
java.io.File |
getDir() |
boolean |
isEmpty() |
java.io.File[] |
listFiles() |
java.lang.String |
toString() |
java.net.URL |
toURL()
This is taken from the JDK 1.2 File class
|
public TempDirectory(java.lang.String name) throws java.io.IOException
java.io.IOException
public void empty() throws java.io.IOException
java.io.IOException
public java.net.URL toURL() throws java.net.MalformedURLException
java.net.MalformedURLException
public java.io.File[] listFiles()
public java.io.File createTempFile(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public java.io.File createEmptyTempFile(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static byte[] getBinaryTestData(int howMuch)
public java.lang.String toString()
toString
in class java.lang.Object
public java.io.File createTempBinaryFile(java.lang.String fileName, int size) throws java.io.IOException
java.io.IOException
public boolean isEmpty()
public void delete() throws java.io.IOException
java.io.IOException
public java.io.File getDir()
public boolean containsFileName(java.lang.String fileName)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"