|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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. |
Method Detail |
public boolean canReclaimMemory()
createTile()
might be created without allocating
new memory for the requisite data array.public boolean isMemoryCache()
true
if this object can cache in main memory
any data arrays which might be made available for future use.public long getMemoryUsed()
public void flush()
public WritableRaster createTile(SampleModel sampleModel, Point location)
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.sampleModel
- The SampleModel
to use in
creating the WritableRaster
.location
- The location (minX, minY
) of
the WritableRaster
; if null
,
(0, 0)
will be used.WritableRaster
which might have a
DataBuffer
created using a previously
allocated array.IllegalArgumentionException
- if sampleModel
is null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |