|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaitools.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
Constants identifying tile actions. |
| 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()
Queries if this tile has been cached to disk. |
void |
deleteDiskCopy()
Deletes this tile's disk cache file. |
int |
getAction()
Gets the most recent action for this tile. |
static File |
getCacheFolder()
Get the current cache folder. |
File |
getFile()
Gets this tile's disk cache file. |
Point |
getLocation()
Gets this tile's location in its parent image in pixel coordinates |
RenderedImage |
getOwner()
Gets the image that owns this tile. |
Raster |
getTile()
Do not use this method. |
Object |
getTileCacheMetric()
Gets the tile cache metric for this tile. |
Object |
getTileId()
Gets the unique ID for this tile. |
long |
getTileSize()
Gets the tile size in bytes. |
long |
getTileTimeStamp()
Gets the last time of access for this tile. |
int |
getTileX()
Gets the X ordinate of this tile in the parent image tile grid. |
int |
getTileY()
Gets the Y ordinate of this tile in the parent image tile grid. |
boolean |
isWritable()
Queries 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.
true if the tile is cached on disk; false otherwisepublic File getFile()
null if the tile has not
been cached to disk.
nullpublic void deleteDiskCopy()
public Object getTileId()
public Point getLocation()
public int getTileX()
public int getTileY()
public boolean isWritable()
true if writable; false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||