Package org.openstreetmap.josm.gui
Class GettingStarted.MotdContent
- java.lang.Object
-
- org.openstreetmap.josm.io.CacheCustomContent<java.io.IOException>
-
- org.openstreetmap.josm.gui.GettingStarted.MotdContent
-
- Enclosing class:
- GettingStarted
static class GettingStarted.MotdContent extends CacheCustomContent<java.io.IOException>
Grabs current MOTD from cache or webpage and parses it.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
myJava
private java.lang.String
myLang
private int
myVersion
-
Fields inherited from class org.openstreetmap.josm.io.CacheCustomContent
INTERVAL_ALWAYS, INTERVAL_DAILY, INTERVAL_HOURLY, INTERVAL_MONTHLY, INTERVAL_NEVER, INTERVAL_WEEKLY
-
-
Constructor Summary
Constructors Constructor Description MotdContent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isCacheValid()
Additionally check if JOSM has been updated and refresh MOTDprotected boolean
isOffline()
Checks underlying resource is not accessed in offline mode.protected byte[]
updateData()
This function gets executed whenever the cached files need updating-
Methods inherited from class org.openstreetmap.josm.io.CacheCustomContent
flushData, getData, getDataString, updateForceString, updateIfRequired, updateIfRequiredString
-
-
-
-
Constructor Detail
-
MotdContent
MotdContent()
-
-
Method Detail
-
updateData
protected byte[] updateData() throws java.io.IOException
This function gets executed whenever the cached files need updating- Specified by:
updateData
in classCacheCustomContent<java.io.IOException>
- Returns:
- the data to cache
- Throws:
java.io.IOException
- See Also:
CacheCustomContent.updateData()
-
isOffline
protected boolean isOffline()
Description copied from class:CacheCustomContent
Checks underlying resource is not accessed in offline mode.- Specified by:
isOffline
in classCacheCustomContent<java.io.IOException>
- Returns:
- whether resource is accessed in offline mode
-
isCacheValid
protected boolean isCacheValid()
Additionally check if JOSM has been updated and refresh MOTD- Overrides:
isCacheValid
in classCacheCustomContent<java.io.IOException>
- Returns:
- True if the cached copy is still valid
-
-