
public class TileWriter extends Object implements IFilesystemCache
IFilesystemCache. It writes tiles to the file system cache. If the
cache exceeds 600 Mb then it will be trimmed to 500 Mb.OpenStreetMapTileProviderConstants| Modifier and Type | Field and Description |
|---|---|
(package private) static boolean |
hasInited |
(package private) Thread |
initThread |
| Constructor and Description |
|---|
TileWriter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(ITileSource pTileSource,
MapTile pTile)
return true if the map file for download already exists
|
static long |
getUsedCacheSpace()
Get the amount of disk space used by the tile cache.
|
void |
onDetach()
Used when the map engine is shutdown, use it to perform any clean up activities and to terminate
any background threads
|
boolean |
remove(ITileSource pTileSource,
MapTile pTile)
Removes a tile from the cache, see issue
https://github.com/osmdroid/osmdroid/issues/426
|
boolean |
saveFile(ITileSource pTileSource,
MapTile pTile,
InputStream pStream)
Save an InputStream as the specified tile in the file system cache for the specified tile
source.
|
static boolean hasInited
Thread initThread
public static long getUsedCacheSpace()
public boolean saveFile(ITileSource pTileSource, MapTile pTile, InputStream pStream)
IFilesystemCachesaveFile in interface IFilesystemCachepTileSource - a tile sourcepTile - a tilepStream - an InputStreampublic void onDetach()
IFilesystemCacheonDetach in interface IFilesystemCachepublic boolean remove(ITileSource pTileSource, MapTile pTile)
IFilesystemCacheremove in interface IFilesystemCachepublic boolean exists(ITileSource pTileSource, MapTile pTile)
IFilesystemCacheexists in interface IFilesystemCache