|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaitools.tilecache.DiskCachedTile
public final class DiskCachedTile
A managed tile class for DiskMemTileCache. Represents an image tile
that can be cached on disk and/or in memory.
DiskMemTileCache| Nested Class Summary | |
|---|---|
static class |
DiskCachedTile.TileAction
|
| Field Summary | |
|---|---|
static String |
FILE_PREFIX
The prefix used for temporary cache files data |
static String |
FILE_SUFFIX
The suffix used for temporary cache files |
| Method Summary | |
|---|---|
boolean |
cachedToDisk()
Query if this tile has been cached to disk. |
void |
deleteDiskCopy()
Delete this tile's disk cache file |
int |
getAction()
Get the most recent action for this tile. |
static File |
getCacheFolder()
Get the current cache folder. |
File |
getFile()
Get this tile's disk cache file. |
Point |
getLocation()
Get this tile's location in its parent image in pixel coordinates |
RenderedImage |
getOwner()
Get the image that owns this tile |
Raster |
getTile()
Do not use this method. |
Object |
getTileCacheMetric()
|
Object |
getTileId()
Get the unique ID for this tile. |
long |
getTileSize()
Get the tile size in bytes. |
long |
getTileTimeStamp()
Get the last time of access for this tile |
int |
getTileX()
Return the X location (column) of this tile |
int |
getTileY()
Return the Y location (row) of this tile |
boolean |
isWritable()
Query if this tile is writable |
static void |
setCacheFolder(File folder)
Set the current cache folder. |
String |
toString()
Returns a string representation of this cached tile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE_PREFIX
public static final String FILE_SUFFIX
| Method Detail |
|---|
public static File getCacheFolder()
File object for the current cache folder
or null if the default system folder is being
used (ie. the folder corresponding to the java.io.file
System propertypublic static void setCacheFolder(File folder)
It is safe, though not necessarily sensible, to change the cache folder while one or more caches are running.
folder - the new cache folder or null to use
the System's default temporary file folderpublic String toString()
toString in class Objectpublic Raster getTile()
It is implemented to satisfy the CAchedTile interface but calling it will provoke an UnsupportedOperationException.
To get a tile, use DiskBasedTileCache#getTile(java.awt.image.RenderedImage, int, int)
getTile in interface javax.media.jai.CachedTilepublic RenderedImage getOwner()
getOwner in interface javax.media.jai.CachedTilepublic long getTileTimeStamp()
getTileTimeStamp in interface javax.media.jai.CachedTilepublic Object getTileCacheMetric()
getTileCacheMetric in interface javax.media.jai.CachedTilepublic long getTileSize()
getTileSize in interface javax.media.jai.CachedTilepublic int getAction()
int code = tile.getAction();
TileAction action = TileAction.get(code);
System.out.println("tile action: " + action.getDescription());
getAction in interface javax.media.jai.CachedTilepublic boolean cachedToDisk()
getFile() != null
public File getFile()
null.
public void deleteDiskCopy()
public Object getTileId()
public Point getLocation()
public int getTileX()
public int getTileY()
public boolean isWritable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||