navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
org.navitproject.navit.NavitMapDownloader Class Reference
Inheritance diagram for org.navitproject.navit.NavitMapDownloader:

Data Structures

class  osm_map_values
 

Public Member Functions

 NavitMapDownloader (int map_id)
 
void run ()
 
void stop_thread ()
 

Static Public Member Functions

static NavitMap[] getAvailableMaps ()
 

Static Public Attributes

static final osm_map_values[] osm_maps
 

Protected 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)
 

Protected Attributes

int retry_counter = 0
 

Package Functions

void enableRetry ()
 

Private Attributes

String map_filename_path
 
Boolean stop_me = false
 
osm_map_values map_values
 
int map_id
 
long uiLastUpdated = -1
 
Boolean retryDownload = false
 

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
 
static final String TAG = "NavitMapDownloader"
 

Detailed Description

Author
rikky

Constructor & Destructor Documentation

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

Member Function Documentation

boolean org.navitproject.navit.NavitMapDownloader.deleteMap ( )
inlineprotected
boolean org.navitproject.navit.NavitMapDownloader.downloadData ( URLConnection  c,
long  already_read,
long  real_size_bytes,
boolean  resume,
File  outputFile 
)
inlineprotected
static NavitMap [] org.navitproject.navit.NavitMapDownloader.getAvailableMaps ( )
inlinestatic
File org.navitproject.navit.NavitMapDownloader.getDestinationFile ( )
inlineprotected
long org.navitproject.navit.NavitMapDownloader.getFreeSpace ( )
inlineprotected
BufferedOutputStream org.navitproject.navit.NavitMapDownloader.getOutputStream ( File  outputFile,
boolean  resume 
)
inlineprotected
URL org.navitproject.navit.NavitMapDownloader.readFileInfo ( )
inlineprotected
void org.navitproject.navit.NavitMapDownloader.stop_thread ( )
inline
void org.navitproject.navit.NavitMapDownloader.toast ( String  message)
inlineprotected
void org.navitproject.navit.NavitMapDownloader.updateProgress ( long  positionBytes,
long  maximumBytes,
String  infoText 
)
inlineprotected
void org.navitproject.navit.NavitMapDownloader.writeFileInfo ( URLConnection  c,
long  sizeInBytes 
)
inlineprotected

Field Documentation

String org.navitproject.navit.NavitMapDownloader.map_filename_path
private
int org.navitproject.navit.NavitMapDownloader.map_id
private
final int org.navitproject.navit.NavitMapDownloader.MAP_READ_FILE_BUFFER = 1024 * 64
staticprivate
osm_map_values org.navitproject.navit.NavitMapDownloader.map_values
private
final int org.navitproject.navit.NavitMapDownloader.MAP_WRITE_FILE_BUFFER = 1024 * 64
staticprivate
final int org.navitproject.navit.NavitMapDownloader.MAP_WRITE_MEM_BUFFER = 1024 * 64
staticprivate
final int org.navitproject.navit.NavitMapDownloader.MAX_RETRIES = 5
staticprivate
int org.navitproject.navit.NavitMapDownloader.retry_counter = 0
protected
Boolean org.navitproject.navit.NavitMapDownloader.retryDownload = false
private
final int org.navitproject.navit.NavitMapDownloader.SOCKET_CONNECT_TIMEOUT = 60000
staticprivate
final int org.navitproject.navit.NavitMapDownloader.SOCKET_READ_TIMEOUT = 120000
staticprivate
Boolean org.navitproject.navit.NavitMapDownloader.stop_me = false
private
long org.navitproject.navit.NavitMapDownloader.uiLastUpdated = -1
private
final int org.navitproject.navit.NavitMapDownloader.UPDATE_PROGRESS_TIME_NS = 1000 * 1000000
staticprivate

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