| javax.media.jai.TileFactory
All known Subclasses: javax.media.jai.RecyclingTileFactory,
TileFactory | public interface TileFactory (Code) | | An interface defining a mechanism which may be used to create tiles
for an image. Implementations of this interface might be based for
example on managing a pool of memory, recycling previously allocated
memory, or using an image as a backing store.
since: JAI 1.1.2 |
Method Summary | |
boolean | canReclaimMemory() Returns a value indicating whether a tile returned by
createTile() might be created without allocating
new memory for the requisite data array. | WritableRaster | createTile(SampleModel sampleModel, Point location) Create a tile with the specified SampleModel and
location, possibly using a DataBuffer constructed
using a reclaimed data bank (array). | void | flush() Removes references to all internally cached data arrays, if any. | long | getMemoryUsed() Returns the amount of memory currently being consumed by data
arrays cached within this object. | boolean | isMemoryCache() Returns true if this object can cache in main memory
any data arrays which might be made available for future use. |
canReclaimMemory | boolean canReclaimMemory()(Code) | | Returns a value indicating whether a tile returned by
createTile() might be created without allocating
new memory for the requisite data array.
|
createTile | WritableRaster createTile(SampleModel sampleModel, Point location)(Code) | | Create a tile with the specified SampleModel and
location, possibly using a DataBuffer constructed
using a reclaimed data bank (array). If it is not possible to
reclaim an array, a new one will be allocated so that a tile
is guaranteed to be generated. If a reclaimed array is used
to create the tile, its elements should be set to zero before
the tile is returned to the caller.
Parameters: sampleModel - The SampleModel to use increating the WritableRaster . Parameters: location - The location (minX, minY ) ofthe WritableRaster ; if null ,(0, 0) will be used. A WritableRaster which might have aDataBuffer created using a previouslyallocated array. throws: IllegalArgumentionException - if sampleModel is null . |
flush | void flush()(Code) | | Removes references to all internally cached data arrays, if any.
If such arrays are objects potentially subject to finalization,
then this should make them available for garbage collection
provided no references to them are held elsewhere.
|
getMemoryUsed | long getMemoryUsed()(Code) | | Returns the amount of memory currently being consumed by data
arrays cached within this object. If this object does not cache
data arrays then this method will always return zero.
The amount of memory used by internally cached data arrays,measured in bytes. |
isMemoryCache | boolean isMemoryCache()(Code) | | Returns true if this object can cache in main memory
any data arrays which might be made available for future use.
|
|
|