protected class OsmFileCacheTileLoader.FileLoadJob extends java.lang.Object implements TileJob
| Modifier and Type | Field and Description |
|---|---|
(package private) long |
fileAge |
(package private) boolean |
fileTilePainted |
(package private) java.io.InputStream |
input |
(package private) Tile |
tile |
(package private) java.io.File |
tileCacheDir |
(package private) java.io.File |
tileFile |
| Constructor and Description |
|---|
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. |
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(java.net.URLConnection urlConn) |
void |
run() |
protected void |
saveTagsToFile() |
protected void |
saveTileToFile(byte[] rawData) |
java.io.InputStream input
java.io.File tileCacheDir
java.io.File tileFile
long fileAge
boolean fileTilePainted
public FileLoadJob(Tile tile)
public Tile getTile()
TileJobpublic void run()
run in interface java.lang.Runnableprotected void loadOrUpdateTile()
protected boolean loadTileFromFile()
protected byte[] loadTileInBuffer(java.net.URLConnection urlConn) throws java.io.IOException
java.io.IOExceptionprotected 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.IOExceptionprotected boolean hasOsmTileETag(java.lang.String eTag) throws java.io.IOException
java.io.IOExceptionprotected java.io.File getTileFile()
protected java.io.File getTagsFile()
protected void saveTileToFile(byte[] rawData)
protected void saveTagsToFile()
private void loadOldETagfromFile()
protected void loadTagsFromFile()