public class HDFCachedGrid extends CachedGrid
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CACHE_SIZE
Default cache size in bytes.
|
static int |
DEFAULT_TILE_SIZE
Default tile size in bytes.
|
accessMode, DEFAULT_MAX_TILES, DEFAULT_TILE_DIMS, READ_ONLY, READ_WRITE, tiling
data, dims, isUnsigned, lookup, unsignedType
Constructor and Description |
---|
HDFCachedGrid(Grid grid,
HDFReader reader)
Constructs a new read-only HDF cached grid with the specified
properties.
|
HDFCachedGrid(Grid grid,
HDFWriter writer)
Constructs a new read-write HDF cached grid with the specified
properties.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getDataClass()
Gets the data class.
|
java.lang.Object |
getDataStream()
Gets the cache data stream as an object.
|
protected TilingScheme.Tile |
readTile(TilingScheme.TilePosition pos)
Reads the specified tile.
|
void |
setTileDims(int[] dims)
Creates a new cache where each tile has the specified dimensions.
|
protected void |
writeTile(TilingScheme.Tile tile)
Writes the specified tile.
|
flush, getCoveringPositions, getData, getData, getMaxTiles, getTileDims, getTileSize, getTilingScheme, getValue, getValue, main, resetCache, setCacheSize, setData, setData, setMaxTiles, setOptimizedCacheSize, setTileSize, setValue, setValue
arraycopy, checkSubset, getNavigation, getSubset, getValue, interpolate, navigate, setNavigation, setValue
convertUnits, dispose, format, format, format, getClassBits, getDecimals, getDimensions, getFormat, getLongName, getMissing, getName, getOptimalStride, getRank, getScaling, getStatistics, getStatistics, getStatistics, getStatistics, getUnits, getUnsigned, getValue, getValues, setAccessHint, setFormat, setLongName, setLookup, setMissing, setName, setUnits, setUnsigned, setValue, toString
clone, getMetadataMap
public static final int DEFAULT_TILE_SIZE
public static final int DEFAULT_CACHE_SIZE
public HDFCachedGrid(Grid grid, HDFReader reader) throws java.io.IOException
grid
- the grid to use for attributes.reader
- the HDF reader data source.java.io.IOException
- if a problem occurred accessing the HDF file.public HDFCachedGrid(Grid grid, HDFWriter writer) throws java.io.IOException
grid
- the grid to use for attributes.writer
- the HDF writer data destination.java.io.IOException
- if a problem occurred accessing the HDF file.public java.lang.Class getDataClass()
getDataClass
in class DataVariable
public java.lang.Object getDataStream()
CachedGrid
getDataStream
in class CachedGrid
public void setTileDims(int[] dims)
setTileDims
in class CachedGrid
dims
- the tile dimensions as [rows, columns].protected TilingScheme.Tile readTile(TilingScheme.TilePosition pos) throws java.io.IOException
CachedGrid
readTile
in class CachedGrid
pos
- the tile position to read.java.io.IOException
- if an error occurred reading the tile data.protected void writeTile(TilingScheme.Tile tile) throws java.io.IOException
CachedGrid
writeTile
in class CachedGrid
tile
- the tile to write.java.io.IOException
- if an error occurred writing the tile data.