public class Cache
extends java.lang.Object
Constructor and Description |
---|
Cache()
Creates a new instance of a Cache
|
Modifier and Type | Method and Description |
---|---|
void |
addImage(PDFPage page,
ImageInfo info,
java.awt.image.BufferedImage image)
Add an image to the cache.
|
void |
addImage(PDFPage page,
ImageInfo info,
java.awt.image.BufferedImage image,
PDFRenderer renderer)
Add an image to the cache.
|
void |
addPage(java.lang.Integer pageNumber,
PDFPage page)
Add a page to the cache.
|
void |
addPage(java.lang.Integer pageNumber,
PDFPage page,
PDFParser parser)
Add a page to the cache.
|
java.awt.image.BufferedImage |
getImage(PDFPage page,
ImageInfo info)
Get an image from the cache
|
PDFRenderer |
getImageRenderer(PDFPage page,
ImageInfo info)
Get an image's renderer from the cache
|
PDFPage |
getPage(java.lang.Integer pageNumber)
Get a page from the cache
|
PDFParser |
getPageParser(java.lang.Integer pageNumber)
Get a page's parser from the cache
|
void |
removeImage(PDFPage page,
ImageInfo info)
Remove an image and its associated renderer from the cache
|
void |
removePage(java.lang.Integer pageNumber)
Remove a page and all its associated images, as well as its parser
and renderers, from the cache
|
public void addPage(java.lang.Integer pageNumber, PDFPage page)
pageNumber
- the page number of this pagepage
- the page to addpublic void addPage(java.lang.Integer pageNumber, PDFPage page, PDFParser parser)
pageNumber
- the page number of this pagepage
- the page to addparser
- the parser which is parsing this pagepublic void addImage(PDFPage page, ImageInfo info, java.awt.image.BufferedImage image)
page
- page this image is associated withinfo
- the image info associated with this imageimage
- the image to addpublic void addImage(PDFPage page, ImageInfo info, java.awt.image.BufferedImage image, PDFRenderer renderer)
page
- the page this image is associated withinfo
- the image info associated with this imageimage
- the image to addrenderer
- the renderer which is rendering this pagepublic PDFPage getPage(java.lang.Integer pageNumber)
pageNumber
- the number of the page to getpublic PDFParser getPageParser(java.lang.Integer pageNumber)
pageNumber
- the number of the page to get the parser forpublic java.awt.image.BufferedImage getImage(PDFPage page, ImageInfo info)
page
- the page the image is associated withinfo
- the image info that describes the imagepublic PDFRenderer getImageRenderer(PDFPage page, ImageInfo info)
page
- the page this image was generated frominfo
- the image info describing the imagepublic void removePage(java.lang.Integer pageNumber)
pageNumber
- the number of the page to remove