|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcdox.util.TempFiles
This is a utility class that takes care of some temporarily files. One gets a unique key (the temp file name) to get an input stream out of the get method ("got" it?)(yes, probably a bad one).
| Constructor Summary | |
TempFiles()
|
|
| Method Summary | |
static java.lang.String |
add(java.awt.image.BufferedImage image)
This method adds an image as temp file. |
static java.lang.String |
add(java.io.File f)
This method adds a temp file. |
static void |
add(java.lang.String key,
java.io.File f)
This method adds a temp file that has already been created. |
static java.lang.String |
add(java.util.zip.ZipFile f,
java.util.zip.ZipEntry e)
This method adds a temp file. |
static java.io.BufferedInputStream |
get(java.lang.String s)
Returns the input stream for the temp file associated with the specified name. |
static java.awt.image.BufferedImage |
getImage(java.lang.String s)
Returns a buffered image that has previously been stored in a temp file. |
static java.awt.image.BufferedImage |
loadImage(java.io.InputStream in)
Reads an image out of the stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TempFiles()
| Method Detail |
public static void add(java.lang.String key,
java.io.File f)
key - the temp file key.f - the temp file.
public static java.lang.String add(java.io.File f)
throws java.io.IOException
f - the file to read the temp file from.
java.io.IOException - if the temporary file could not be created or the original file
could not be read.
public static java.lang.String add(java.util.zip.ZipFile f,
java.util.zip.ZipEntry e)
throws java.io.IOException
f - the file to read the temp file from.e - the zip entry to use.
java.io.IOException - if the temporary file could not be created or the original file
could not be read.
public static java.lang.String add(java.awt.image.BufferedImage image)
throws java.io.IOException
image - the image to temporary store.
java.io.IOException - if the temporary file could not be created.public static java.io.BufferedInputStream get(java.lang.String s)
s - the key for the temp file.
public static java.awt.image.BufferedImage getImage(java.lang.String s)
s - the key for the temp file.
public static java.awt.image.BufferedImage loadImage(java.io.InputStream in)
throws java.io.IOException
in - where to read the image.
java.io.IOException - if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||