protected class OsmFileCacheTileLoader.FileLoadJob extends java.lang.Object implements TileJob
Constructor and Description |
---|
OsmFileCacheTileLoader.FileLoadJob(Tile tile) |
Modifier and Type | Method and Description |
---|---|
protected java.io.File |
getTagsFile() |
Tile |
getTile()
Function to return the tile associated with the job
|
protected java.io.File |
getTileFile() |
protected boolean |
hasOsmTileETag(java.lang.String eTag) |
protected boolean |
isOsmTileNewer(long fileAge)
Performs a
HEAD request for retrieving the
LastModified header value. |
protected void |
loadOrUpdateTile() |
protected void |
loadTagsFromFile() |
protected boolean |
loadTileFromFile() |
protected byte[] |
loadTileInBuffer(java.net.URLConnection urlConn) |
void |
run() |
protected void |
saveTagsToFile() |
protected void |
saveTileToFile(byte[] rawData) |
public OsmFileCacheTileLoader.FileLoadJob(Tile tile)
public Tile getTile()
TileJob
public void run()
run
in interface java.lang.Runnable
protected void loadOrUpdateTile()
protected boolean loadTileFromFile()
protected byte[] loadTileInBuffer(java.net.URLConnection urlConn) throws java.io.IOException
java.io.IOException
protected boolean isOsmTileNewer(long fileAge) throws java.io.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
filejava.io.IOException
protected boolean hasOsmTileETag(java.lang.String eTag) throws java.io.IOException
java.io.IOException
protected java.io.File getTileFile()
protected java.io.File getTagsFile()
protected void saveTileToFile(byte[] rawData)
protected void saveTagsToFile()
protected void loadTagsFromFile()