|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.varienaja.util.coverart.CoverArtManager
public class CoverArtManager
This class manages a store of cover art pictures in different sizes. It hides the details of the file system handling from the users of the storage. The class uses long-typed keys to identify the different covers.
Constructor Summary | |
---|---|
CoverArtManager()
|
Method Summary | |
---|---|
static void |
add(long id,
java.io.InputStream in)
Add cover art picture from the InputStream to the storage. |
static boolean |
contains(long id,
int size)
Tests the existence of a cover art picture for the specified id and size. |
static java.io.File |
get(long id,
int size)
Returns the file containing the cover art of the specified id and size. |
static void |
purge(long id)
Deletes all entries for this id. |
static void |
scale(long id,
int size)
Scales the original image of the specified id to the specified size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CoverArtManager()
Method Detail |
---|
public static void add(long id, java.io.InputStream in) throws java.io.IOException
id
- The id of the added cover.in
- The input stream containing the picture.size
- The size of the picture.
java.io.IOException
- An error occured when reading the input stream or during writing the picture.public static java.io.File get(long id, int size)
id
- The requested cover art id.size
- The requested cover art size.
public static void purge(long id)
id
- The id to delete.public static boolean contains(long id, int size)
id
- The id of the cover art.size
- The size of the cover art.
public static void scale(long id, int size) throws java.io.FileNotFoundException
id
- The cover art id.size
- The requested picture size to create.
java.io.FileNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |