protected class OsmFileCacheTileLoader.FileLoadJob extends Object implements TileJob
Modifier and Type | Field and Description |
---|---|
(package private) long |
fileAge |
(package private) boolean |
fileTilePainted |
(package private) InputStream |
input |
(package private) Tile |
tile |
(package private) File |
tileCacheDir |
(package private) File |
tileFile |
Constructor and Description |
---|
FileLoadJob(Tile tile) |
Modifier and Type | Method and Description |
---|---|
protected File |
getTagsFile() |
Tile |
getTile()
Function to return the tile associated with the job
|
protected File |
getTileFile() |
protected boolean |
hasOsmTileETag(String eTag) |
protected boolean |
isOsmTileNewer(long fileAge)
Performs a
HEAD request for retrieving the
LastModified header value. |
private void |
loadOldETagfromFile()
Load backward-compatiblity .etag file and if it exists move it to new .tags file
|
protected void |
loadOrUpdateTile() |
protected void |
loadTagsFromFile() |
protected boolean |
loadTileFromFile() |
protected byte[] |
loadTileInBuffer(URLConnection urlConn) |
void |
run() |
protected void |
saveTagsToFile() |
protected void |
saveTileToFile(byte[] rawData) |
InputStream input
File tileCacheDir
long fileAge
boolean fileTilePainted
public FileLoadJob(Tile tile)
public Tile getTile()
TileJob
protected void loadOrUpdateTile()
protected boolean loadTileFromFile()
protected byte[] loadTileInBuffer(URLConnection urlConn) throws IOException
IOException
protected boolean isOsmTileNewer(long fileAge) throws IOException
HEAD
request for retrieving the
LastModified
header value.
Note: This does only work with servers providing the
LastModified
header:
OsmTileSource.CycleMap
- supportedOsmTileSource.Mapnik
- not supportedfileAge
- time of thetrue
if the tile on the server is newer than the
fileIOException
protected boolean hasOsmTileETag(String eTag) throws IOException
IOException
protected File getTileFile()
protected File getTagsFile()
protected void saveTileToFile(byte[] rawData)
protected void saveTagsToFile()
private void loadOldETagfromFile()
protected void loadTagsFromFile()