| java.lang.Object com.sun.pdfview.Cache
Cache | public class Cache (Code) | | A cache of PDF pages and images.
|
Inner Class :class Record | |
Inner Class :class PageRecord extends Record | |
Constructor Summary | |
public | Cache() |
Method Summary | |
public void | addImage(PDFPage page, ImageInfo info, BufferedImage image) Add an image to the cache. | public void | addImage(PDFPage page, ImageInfo info, BufferedImage image, PDFRenderer renderer) Add an image to the cache. | Record | addImageRecord(PDFPage page, ImageInfo info, BufferedImage image, PDFRenderer renderer) The internal routine to add an image to the cache and return the
record that was generated. | public void | addPage(Integer pageNumber, PDFPage page) Add a page to the cache. | public void | addPage(Integer pageNumber, PDFPage page, PDFParser parser) Add a page to the cache. | PageRecord | addPageRecord(Integer pageNumber, PDFPage page, PDFParser parser) | public BufferedImage | getImage(PDFPage page, ImageInfo info) | Record | getImageRecord(PDFPage page, ImageInfo info) | public PDFRenderer | getImageRenderer(PDFPage page, ImageInfo info) | public PDFPage | getPage(Integer pageNumber) | public PDFParser | getPageParser(Integer pageNumber) | PageRecord | getPageRecord(Integer pageNumber) | public void | removeImage(PDFPage page, ImageInfo info) | Record | removeImageRecord(PDFPage page, ImageInfo info) | public void | removePage(Integer pageNumber) | PageRecord | removePageRecord(Integer pageNumber) |
Cache | public Cache()(Code) | | Creates a new instance of a Cache
|
addImage | public void addImage(PDFPage page, ImageInfo info, BufferedImage image)(Code) | | Add an image to the cache. This method should be used for images
which have already been completely rendered
Parameters: page - page this image is associated with Parameters: info - the image info associated with this image Parameters: image - the image to add |
addImage | public void addImage(PDFPage page, ImageInfo info, BufferedImage image, PDFRenderer renderer)(Code) | | Add an image to the cache. This method should be used for images
which are still in the process of being rendered.
Parameters: page - the page this image is associated with Parameters: info - the image info associated with this image Parameters: image - the image to add Parameters: renderer - the renderer which is rendering this page |
addPage | public void addPage(Integer pageNumber, PDFPage page)(Code) | | Add a page to the cache. This method should be used for
pages which have already been completely rendered.
Parameters: pageNumber - the page number of this page Parameters: page - the page to add |
addPage | public void addPage(Integer pageNumber, PDFPage page, PDFParser parser)(Code) | | Add a page to the cache. This method should be used for
pages which are still in the process of being rendered.
Parameters: pageNumber - the page number of this page Parameters: page - the page to add Parameters: parser - the parser which is parsing this page |
addPageRecord | PageRecord addPageRecord(Integer pageNumber, PDFPage page, PDFParser parser)(Code) | | The internal routine to add a page to the cache, and return the
page record which was generated
|
getImage | public BufferedImage getImage(PDFPage page, ImageInfo info)(Code) | | Get an image from the cache
Parameters: page - the page the image is associated with Parameters: info - the image info that describes the image the image if it is in the cache, or null if not |
getImageRecord | Record getImageRecord(PDFPage page, ImageInfo info)(Code) | | Get an image's record from the cache
the record, or null if it's not in the cache |
getImageRenderer | public PDFRenderer getImageRenderer(PDFPage page, ImageInfo info)(Code) | | Get an image's renderer from the cache
Parameters: page - the page this image was generated from Parameters: info - the image info describing the image the renderer, or null if it is not in the cache |
getPage | public PDFPage getPage(Integer pageNumber)(Code) | | Get a page from the cache
Parameters: pageNumber - the number of the page to get the page, if it is in the cache, or null if not |
getPageParser | public PDFParser getPageParser(Integer pageNumber)(Code) | | Get a page's parser from the cache
Parameters: pageNumber - the number of the page to get the parser for the parser, or null if it is not in the cache |
getPageRecord | PageRecord getPageRecord(Integer pageNumber)(Code) | | Get a page's record from the cache
the record, or null if it's not in the cache |
removeImage | public void removeImage(PDFPage page, ImageInfo info)(Code) | | Remove an image and its associated renderer from the cache
Parameters: page - the page the image is generated from Parameters: info - the image info of the image to remove |
removeImageRecord | Record removeImageRecord(PDFPage page, ImageInfo info)(Code) | | Remove an image's record from the cache
|
removePage | public void removePage(Integer pageNumber)(Code) | | Remove a page and all its associated images, as well as its parser
and renderers, from the cache
Parameters: pageNumber - the number of the page to remove |
removePageRecord | PageRecord removePageRecord(Integer pageNumber)(Code) | | Remove a page's record from the cache
|
|
|