Package org.openstreetmap.josm.tools
Class WikiReader
java.lang.Object
org.openstreetmap.josm.tools.WikiReader
- Direct Known Subclasses:
HelpContentReader
Read a trac-wiki page.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newWikiReader.WikiReader(String baseurl) Constructs a newWikiReaderfor the given base URL. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the base URL of wiki.Read the page specified by the url and return the content.protected StringreadFromTrac(BufferedReader in, URL url) Reads the localized version of the given wiki page.private Stringprivate static StringreadNormal(BufferedReader in, boolean html)
-
Field Details
-
baseurl
-
-
Constructor Details
-
WikiReader
Constructs a newWikiReaderfor the given base URL.- Parameters:
baseurl- The wiki base URL
-
WikiReader
public WikiReader()Constructs a newWikiReader.
-
-
Method Details
-
getBaseUrlWiki
Returns the base URL of wiki.- Returns:
- the base URL of wiki
- Since:
- 7434
-
read
Read the page specified by the url and return the content. If the url is within the baseurl path, parse it as an trac wikipage and replace relative paths etc..- Parameters:
url- the URL to read- Returns:
- The page as string
- Throws:
IOException- Throws, if the page could not be loaded.
-
readLang
Reads the localized version of the given wiki page.- Parameters:
text- The page title, without locale prefix- Returns:
- the localized version of the given wiki page
- Throws:
IOException- if any I/O error occurs
-
readLang
- Throws:
IOException
-
readNormal
-
readFromTrac
- Throws:
IOException
-