|
JPedal Java PDF library 4.70b22 API Documentation - http://www.jpedal.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpedal.io.ObjectStore
public class ObjectStore
set of methods to save/load objects to keep memory usage to a minimum by spooling images to disk Also includes ancillary method to store a filename - LogWriter is my logging class - Several methods are very similar and I should recode my code to use a common method for the RGB conversion Converted to avoid threading issues, if this causes any problems, please raise them in our forums, http://www.jpedal.org/support.php
| Field Summary | |
|---|---|
java.lang.String |
fullFileName
|
static java.lang.Integer |
IMAGE_COLORSPACE
paramter stored on cached images |
static java.lang.Integer |
IMAGE_HEIGHT
parameter stored on cached images |
static java.lang.Integer |
IMAGE_MASKCOL
paramter stored on cached images |
static java.lang.Integer |
IMAGE_pX
parameter stored on cached images |
static java.lang.Integer |
IMAGE_pY
parameter stored on cached images |
static java.lang.Integer |
IMAGE_WIDTH
parameter stored on cached images |
static boolean |
isMultiThreaded
do not set unless you know what you are doing |
static java.lang.String |
multiThreaded_root_dir
|
static java.lang.String |
temp_dir
temp storage for the images so they are not held in memory |
static long |
time
period after which we assumes files must be dead (ie from crashed instance) default is four hour image time |
static boolean |
verifyFilesSaved
flag to verify if temp dir created and throw RuntimeException if not |
| Constructor Summary | |
|---|---|
ObjectStore()
ObjectStore - Converted for Threading purposes - To fix any errors please try replacing ObjectStore with {your instance of PdfDecoder}.getObjectStore() - |
|
| Method Summary | |
|---|---|
static void |
cachePage(java.lang.Integer key,
org.jpedal.render.DynamicVectorRenderer currentDisplay)
|
static void |
cachePageAsBytes(java.lang.String key,
byte[] bytes)
|
static void |
copy(java.io.BufferedInputStream from,
java.io.BufferedOutputStream to)
|
static void |
copy(java.lang.String source,
java.lang.String destination)
save copy Converted to avoid threading issues, if this causes any problems, please raise them in our forums, http://www.jpedal.org/ |
static void |
copyCMYKimages(java.lang.String target_dir)
copies cmyk raw data from cmyk temp dir to target directory |
static java.io.File |
createTempFile(java.lang.String filename)
|
void |
finalize()
|
void |
flush()
routine to remove all objects from temp store |
static void |
flushPages()
delete all cached pages |
static org.jpedal.render.DynamicVectorRenderer |
getCachedPage(java.lang.Integer key)
note may not actually be written by JVM immediately so do not rely for fast actions |
static byte[] |
getCachedPageAsBytes(java.lang.String key)
|
java.lang.String |
getCurrentFilename()
get the file name - we use this as a get in our file repository - Note this method is not part of the API and is not guaranteed to be in future versions of JPedal - |
java.lang.String |
getCurrentFilepath()
get the file path for current PDF Note this method is not part of the API and is not guaranteed to be in future versions of JPedal - |
java.lang.String |
getFileForCachedImage(java.lang.String current_image)
|
java.lang.String |
getImageType(java.lang.String current_image)
get type of image used to store graphic |
java.lang.String |
getKey()
|
byte[] |
getRawImageData(java.lang.String i)
retrieve byte data on disk |
java.lang.Object |
getRawImageDataParameter(java.lang.String imageID,
java.lang.Integer key)
return parameter stored for image or null |
void |
init(java.lang.String current_key)
init method to pass in values for temp directory, unique key, etc so program knows where to store files |
boolean |
isImageCached(java.lang.String current_image)
see if image already saved to disk (ie multiple pages) |
boolean |
isRawImageDataSaved(java.lang.String number)
see if image data saved |
java.awt.image.BufferedImage |
loadStoredImage(java.lang.String current_image)
load a image when required and remove from store |
static java.lang.String |
removeIllegalFileNameCharacters(java.lang.String s)
Remove troublesome characters from temp file names. |
void |
saveAsCopy(java.lang.String current_image,
java.lang.String destination)
save copy |
boolean |
saveRawCMYKImage(byte[] image_data,
java.lang.String name)
save raw CMYK data in CMYK directory - We extract the DCT encoded image stream and save as a file with a .jpeg ending so we have the raw image - This works for DeviceCMYK - |
void |
saveRawImageData(java.lang.String pageImgCount,
byte[] bytes,
int w,
int h,
int pX,
int pY,
byte[] maskCol,
int colorSpaceID)
|
boolean |
saveStoredImage(java.lang.String current_image,
java.awt.image.BufferedImage image,
boolean file_name_is_path,
boolean save_unclipped,
java.lang.String type)
save buffered image as JPEG or tif |
void |
setFileToDeleteOnFlush(java.lang.String rawFileName)
add file to list we delete on flush so we can clear any temp files we create |
void |
storeFileName(java.lang.String name)
store filename as a key we can use to differentiate images,etc - Note this method is not part of the API and is not guaranteed to be in future versions of JPedal - |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean verifyFilesSaved
public static final boolean isMultiThreaded
public static java.lang.String temp_dir
public static final java.lang.String multiThreaded_root_dir
public static final java.lang.Integer IMAGE_WIDTH
public static final java.lang.Integer IMAGE_HEIGHT
public static final java.lang.Integer IMAGE_pX
public static final java.lang.Integer IMAGE_pY
public static final java.lang.Integer IMAGE_MASKCOL
public static final java.lang.Integer IMAGE_COLORSPACE
public static final long time
public java.lang.String fullFileName
| Constructor Detail |
|---|
public ObjectStore()
| Method Detail |
|---|
public java.lang.String getCurrentFilename()
public java.lang.String getCurrentFilepath()
public final void storeFileName(java.lang.String name)
public boolean saveRawCMYKImage(byte[] image_data,
java.lang.String name)
public final boolean saveStoredImage(java.lang.String current_image,
java.awt.image.BufferedImage image,
boolean file_name_is_path,
boolean save_unclipped,
java.lang.String type)
public final java.lang.String getImageType(java.lang.String current_image)
public final void init(java.lang.String current_key)
public final java.awt.image.BufferedImage loadStoredImage(java.lang.String current_image)
public final boolean isImageCached(java.lang.String current_image)
public final void flush()
public static void copyCMYKimages(java.lang.String target_dir)
public java.lang.String getFileForCachedImage(java.lang.String current_image)
public final void saveAsCopy(java.lang.String current_image,
java.lang.String destination)
public static void copy(java.lang.String source,
java.lang.String destination)
public static void copy(java.io.BufferedInputStream from,
java.io.BufferedOutputStream to)
public static void flushPages()
public void finalize()
finalize in class java.lang.Objectpublic static org.jpedal.render.DynamicVectorRenderer getCachedPage(java.lang.Integer key)
public static void cachePage(java.lang.Integer key,
org.jpedal.render.DynamicVectorRenderer currentDisplay)
public static byte[] getCachedPageAsBytes(java.lang.String key)
public static void cachePageAsBytes(java.lang.String key,
byte[] bytes)
public void saveRawImageData(java.lang.String pageImgCount,
byte[] bytes,
int w,
int h,
int pX,
int pY,
byte[] maskCol,
int colorSpaceID)
public boolean isRawImageDataSaved(java.lang.String number)
public byte[] getRawImageData(java.lang.String i)
public java.lang.Object getRawImageDataParameter(java.lang.String imageID,
java.lang.Integer key)
public static java.io.File createTempFile(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String removeIllegalFileNameCharacters(java.lang.String s)
s -
public void setFileToDeleteOnFlush(java.lang.String rawFileName)
rawFileName - public java.lang.String getKey()
|
JPedal Java PDF library 4.70b22 API Documentation - http://www.jpedal.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||