public final class DiskCachedTile extends Object implements javax.media.jai.CachedTile
DiskMemTileCache. Represents an image tile
that can be cached on disk and/or in memory.DiskMemTileCache| Modifier and Type | Class and Description |
|---|---|
static class |
DiskCachedTile.TileAction
Constants identifying tile actions.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_PREFIX
The prefix used for temporary cache files
data
|
static String |
FILE_SUFFIX
The suffix used for temporary cache files
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public static final String FILE_PREFIX
public static final String FILE_SUFFIX
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()
public Raster getTile()
It is implemented to satisfy the CachedTile interface but calling it will provoke an UnsupportedOperationException.
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 otherwiseCopyright © 2009–2020. All rights reserved.