public interface ITilePositionIndex
Modifier and Type | Method and Description |
---|---|
int |
getCountOfPopulatedTiles()
Gets the count of the number of tiles that are currently populated.
|
long |
getFilePosition(int tileIndex)
Gets the file position for the specified tile.
|
int |
getStorageSize()
Gets the amount of storage space required to store the tile index, in
bytes.
|
boolean |
isFilePositionSet(int tileIndex)
Indicates whether a file position is set for the specified tile index.
|
void |
readTilePositions(BufferedRandomAccessFile braf)
Reads the tile position data from the specified file.
|
void |
setFilePosition(int tileIndex,
long offset)
Store the specified offset at the position given by the
tile row and column.
|
void |
writeTilePositions(BufferedRandomAccessFile braf)
Writes the tile position data from the specified file.
|
long getFilePosition(int tileIndex)
tileIndex
- a positive integerint getStorageSize()
boolean isFilePositionSet(int tileIndex)
tileIndex
- a positive integervoid readTilePositions(BufferedRandomAccessFile braf) throws IOException
braf
- a valid file referenceIOException
- in the event of an unhandled I/O exception.void setFilePosition(int tileIndex, long offset)
File positions must be positive values and a multiple of eight.
tileIndex
- the index of the tile to be stored.offset
- the file position, in bytes.void writeTilePositions(BufferedRandomAccessFile braf) throws IOException
braf
- a valid file referenceIOException
- in the event of an unhandled I/O exception.int getCountOfPopulatedTiles()
Copyright © 2022. All rights reserved.