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

Data Structures

class  OsmMapValues
 

Public Member Functions

void run ()
 

Package Functions

 NavitMapDownloader (int mapId)
 
void stop_thread ()
 

Static Package Functions

static NavitMap[] getAvailableMaps ()
 

Static Package Attributes

static final OsmMapValues[] osm_maps
 

Private Member Functions

boolean checkFreeSpace (long neededBytes)
 
boolean deleteMap ()
 
boolean download_osm_map ()
 
File getDestinationFile ()
 
boolean downloadData (URLConnection c, long alreadyRead, long realSizeBytes, boolean resume, File outputFile)
 
URL getDownloadURL ()
 
BufferedInputStream getInputStream (URLConnection c)
 
File getMapFile ()
 
File getMapInfoFile ()
 
URLConnection initConnection (URL url)
 
boolean readData (OutputStream buf, InputStream bif, long alreadyRead, long realSizeBytes)
 
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 ()
 

Static Private Member Functions

static BufferedOutputStream getOutputStream (File outputFile, boolean resume)
 

Private Attributes

final OsmMapValues mMapValues
 
final int mMapId
 
Boolean mStopMe = false
 
long mUiLastUpdated = -1
 
Boolean mRetryDownload = false
 
int mRetryCounter = 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
 
static final String TAG = "NavitMapDownLoader"
 

Constructor & Destructor Documentation

◆ NavitMapDownloader()

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

Member Function Documentation

◆ checkFreeSpace()

◆ deleteMap()

◆ download_osm_map()

◆ downloadData()

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

◆ enableRetry()

◆ getAvailableMaps()

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

◆ getDestinationFile()

◆ getDownloadURL()

◆ getInputStream()

◆ getMapFile()

◆ getMapInfoFile()

◆ getOutputStream()

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

◆ initConnection()

◆ readData()

◆ readFileInfo()

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

◆ run()

◆ stop_thread()

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

◆ toast()

◆ updateProgress() [1/2]

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

◆ updateProgress() [2/2]

◆ writeFileInfo()

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

Field Documentation

◆ MAP_READ_FILE_BUFFER

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

◆ 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

◆ mMapId

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

◆ mMapValues

◆ mRetryCounter

◆ mRetryDownload

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

◆ mStopMe

◆ mUiLastUpdated

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

◆ osm_maps

◆ 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

◆ TAG

◆ 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: