navit  0.5.3-trunk
org.navitproject.navit.NavitMapDownloader Class Reference
Inheritance diagram for org.navitproject.navit.NavitMapDownloader:

Data Structures

class  osm_map_values
 

Public Member Functions

void run ()
 
void stop_thread ()
 

Static Public Member Functions

static NavitMap [] getAvailableMaps ()
 

Static Public Attributes

static final osm_map_values [] osm_maps
 

Package Functions

 NavitMapDownloader (int map_id)
 

Private Member Functions

boolean checkFreeSpace (long needed_bytes)
 
boolean deleteMap ()
 
boolean download_osm_map ()
 
File getDestinationFile ()
 
boolean downloadData (URLConnection c, long already_read, long real_size_bytes, boolean resume, File outputFile)
 
URL getDownloadURL ()
 
long getFreeSpace ()
 
BufferedInputStream getInputStream (URLConnection c)
 
File getMapFile ()
 
File getMapInfoFile ()
 
BufferedOutputStream getOutputStream (File outputFile, boolean resume)
 
URLConnection initConnection (URL url)
 
boolean readData (OutputStream buf, InputStream bif, long already_read, long real_size_bytes)
 
URL readFileInfo ()
 
void toast (String message)
 
void updateProgress (long startTime, long offsetBytes, long readBytes, long maxBytes)
 
void updateProgress (long positionBytes, long maximumBytes, String infoText)
 
void writeFileInfo (URLConnection c, long sizeInBytes)
 
void enableRetry ()
 

Private Attributes

final String TAG = this.getClass().getName()
 
final String map_filename_path
 
final osm_map_values map_values
 
final int map_id
 
Boolean stop_me = false
 
long uiLastUpdated = -1
 
Boolean retryDownload = false
 
int retry_counter = 0
 

Static Private Attributes

static final int SOCKET_CONNECT_TIMEOUT = 60000
 
static final int SOCKET_READ_TIMEOUT = 120000
 
static final int MAP_WRITE_FILE_BUFFER = 1024 * 64
 
static final int MAP_WRITE_MEM_BUFFER = 1024 * 64
 
static final int MAP_READ_FILE_BUFFER = 1024 * 64
 
static final int UPDATE_PROGRESS_TIME_NS = 1000 * 1000000
 
static final int MAX_RETRIES = 5
 

Detailed Description

Author
rikky

Constructor & Destructor Documentation

◆ NavitMapDownloader()

org.navitproject.navit.NavitMapDownloader.NavitMapDownloader ( int  map_id)
inlinepackage

Member Function Documentation

◆ checkFreeSpace()

◆ deleteMap()

◆ download_osm_map()

◆ downloadData()

boolean org.navitproject.navit.NavitMapDownloader.downloadData ( URLConnection  c,
long  already_read,
long  real_size_bytes,
boolean  resume,
File  outputFile 
)
inlineprivate

◆ enableRetry()

◆ getAvailableMaps()

static NavitMap [] org.navitproject.navit.NavitMapDownloader.getAvailableMaps ( )
inlinestatic

◆ getDestinationFile()

File org.navitproject.navit.NavitMapDownloader.getDestinationFile ( )
inlineprivate

◆ getDownloadURL()

◆ getFreeSpace()

long org.navitproject.navit.NavitMapDownloader.getFreeSpace ( )
inlineprivate

◆ getInputStream()

◆ getMapFile()

◆ getMapInfoFile()

◆ getOutputStream()

BufferedOutputStream org.navitproject.navit.NavitMapDownloader.getOutputStream ( File  outputFile,
boolean  resume 
)
inlineprivate

◆ initConnection()

URLConnection org.navitproject.navit.NavitMapDownloader.initConnection ( URL  url)
inlineprivate

◆ readData()

◆ readFileInfo()

URL org.navitproject.navit.NavitMapDownloader.readFileInfo ( )
inlineprivate

◆ run()

◆ stop_thread()

void org.navitproject.navit.NavitMapDownloader.stop_thread ( )
inline

◆ toast()

◆ updateProgress() [1/2]

◆ updateProgress() [2/2]

void org.navitproject.navit.NavitMapDownloader.updateProgress ( long  positionBytes,
long  maximumBytes,
String  infoText 
)
inlineprivate

◆ writeFileInfo()

void org.navitproject.navit.NavitMapDownloader.writeFileInfo ( URLConnection  c,
long  sizeInBytes 
)
inlineprivate

Field Documentation

◆ map_filename_path

final String org.navitproject.navit.NavitMapDownloader.map_filename_path
private

◆ map_id

final int org.navitproject.navit.NavitMapDownloader.map_id
private

◆ MAP_READ_FILE_BUFFER

final int org.navitproject.navit.NavitMapDownloader.MAP_READ_FILE_BUFFER = 1024 * 64
staticprivate

◆ map_values

final osm_map_values org.navitproject.navit.NavitMapDownloader.map_values
private

◆ MAP_WRITE_FILE_BUFFER

final int org.navitproject.navit.NavitMapDownloader.MAP_WRITE_FILE_BUFFER = 1024 * 64
staticprivate

◆ MAP_WRITE_MEM_BUFFER

final int org.navitproject.navit.NavitMapDownloader.MAP_WRITE_MEM_BUFFER = 1024 * 64
staticprivate

◆ MAX_RETRIES

final int org.navitproject.navit.NavitMapDownloader.MAX_RETRIES = 5
staticprivate

◆ osm_maps

◆ retry_counter

int org.navitproject.navit.NavitMapDownloader.retry_counter = 0
private

◆ retryDownload

Boolean org.navitproject.navit.NavitMapDownloader.retryDownload = false
private

◆ SOCKET_CONNECT_TIMEOUT

final int org.navitproject.navit.NavitMapDownloader.SOCKET_CONNECT_TIMEOUT = 60000
staticprivate

◆ SOCKET_READ_TIMEOUT

final int org.navitproject.navit.NavitMapDownloader.SOCKET_READ_TIMEOUT = 120000
staticprivate

◆ stop_me

Boolean org.navitproject.navit.NavitMapDownloader.stop_me = false
private

◆ TAG

final String org.navitproject.navit.NavitMapDownloader.TAG = this.getClass().getName()
private

◆ uiLastUpdated

long org.navitproject.navit.NavitMapDownloader.uiLastUpdated = -1
private

◆ UPDATE_PROGRESS_TIME_NS

final int org.navitproject.navit.NavitMapDownloader.UPDATE_PROGRESS_TIME_NS = 1000 * 1000000
staticprivate

The documentation for this class was generated from the following file: