|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.util.ImageCache
public class ImageCache
The ImageCache class is designed to cache image data to the
file system. The cached file can then be read file the file system at a
later time. The ImageCache class was created to help minimize
the amount of data that has to be kept in memory when opening graphic
heavy PDF files. The ImageCache class also speeds up the
loading of a previously decoded image stream as it is much more effecient
to read the decode image from file then it is to decode the image bit stream
every time it is required.
| Constructor Summary | |
|---|---|
ImageCache(Library library)
Create new instance of ImageCache |
|
| Method Summary | |
|---|---|
void |
dispose(boolean cache,
boolean imageRecoverableElsewise)
Dispose of this objects resources |
long |
getLength()
Return the number of bytes used by this images when it is cached. |
boolean |
isCachedSomehow()
|
boolean |
isScaled()
|
java.awt.image.BufferedImage |
readImage()
Read the cached image file and return the corresponding buffered image. |
static java.awt.image.BufferedImage |
scaleBufferedImage(java.awt.image.BufferedImage bim,
int width,
int height)
|
void |
scaleImage(int width,
int height)
|
void |
setImage(java.awt.image.BufferedImage image)
Writes Buffered imate to this object. |
void |
setIsScaled(boolean flag)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageCache(Library library)
library - reference to documents library| Method Detail |
|---|
public void setImage(java.awt.image.BufferedImage image)
image - public java.awt.image.BufferedImage readImage()
public void dispose(boolean cache,
boolean imageRecoverableElsewise)
cache - if true, image will be cached to disk, otherwise, image
resources will be released.imageRecoverableElsewise - If the ImageCache is not the only way
of getting back at the image later
public void scaleImage(int width,
int height)
public void setIsScaled(boolean flag)
public long getLength()
public boolean isScaled()
public boolean isCachedSomehow()
public static java.awt.image.BufferedImage scaleBufferedImage(java.awt.image.BufferedImage bim,
int width,
int height)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||