|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache
This interface represents a structure which can be used to store parts of a PDF to disk, a database or some other secondary storage, to reduce the amount of memory required to generate a PDF.
Generally speaking, an item is eligible for caching when the Cache.Entry.close()
method is called. This is called by the PDFImage.close(), PDFCanvas.flush(),
PDFPage.flush() and PDFSound.close() methods, and it is a good idea to
call these methods when you have created your image/canvas/page and won't be making
any further changes to it (hint - unless you're setting MetaData on a PDFImage, you
can close it immediately after it's created).
At that point, whether the item is swapped out is down the the implementation of the cache.
PDF.setCache(org.faceless.pdf2.Cache),
PDFPage.flush(),
PDFCanvas.flush(),
PDFImage.close(),
PDFSound.close()| Nested Class Summary | |
|---|---|
static interface |
Cache.Entry
Represents a single entry in the Cache. |
| Method Summary | |
|---|---|
Cache.Entry |
newEntry(int bytes)
Return a new Cache.Entry. |
| Method Detail |
|---|
Cache.Entry newEntry(int bytes)
bytes - the expected size of the buffer in byte
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||