public class Cache extends Object
| Constructor and Description |
|---|
Cache()
Creates a new instance of a Cache
|
| Modifier and Type | Method and Description |
|---|---|
void |
addImage(PDFPage page,
ImageInfo info,
BufferedImage image)
Add an image to the cache.
|
void |
addImage(PDFPage page,
ImageInfo info,
BufferedImage image,
PDFRenderer renderer)
Add an image to the cache.
|
void |
addPage(Integer pageNumber,
PDFPage page)
Add a page to the cache.
|
void |
addPage(Integer pageNumber,
PDFPage page,
PDFParser parser)
Add a page to the cache.
|
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(Integer pageNumber)
Get a page from the cache
|
PDFParser |
getPageParser(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(Integer pageNumber)
Remove a page and all its associated images, as well as its parser
and renderers, from the cache
|
public void addPage(Integer pageNumber, PDFPage page)
pageNumber - the page number of this pagepage - the page to addpublic void addPage(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, 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, 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(Integer pageNumber)
pageNumber - the number of the page to getpublic PDFParser getPageParser(Integer pageNumber)
pageNumber - the number of the page to get the parser forpublic 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(Integer pageNumber)
pageNumber - the number of the page to removeCopyright © 2024. All rights reserved.