Class ImageCache
- java.lang.Object
-
- com.norconex.collector.http.processor.impl.ImageCache
-
public class ImageCache extends Object
Caches images. This class should not be instantiated more than once for the same path. It is best to share the instance.- Since:
- 2.8.0
- Author:
- Pascal Essiembre
-
-
Constructor Summary
Constructors Constructor Description ImageCache(int maxSize, Path dir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
getCacheDirectory()
ScaledImage
getImage(String ref)
void
setImage(ScaledImage scaledImage)
-
-
-
Constructor Detail
-
ImageCache
public ImageCache(int maxSize, Path dir)
-
-
Method Detail
-
getCacheDirectory
public Path getCacheDirectory()
-
getImage
public ScaledImage getImage(String ref) throws IOException
- Throws:
IOException
-
setImage
public void setImage(ScaledImage scaledImage) throws IOException
- Throws:
IOException
-
-