public final class WikiGet
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
WikiGet.ResponseError
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static void |
doWikiGet(java.lang.String remoteUrl,
java.lang.String projectdir)
Gets mediawiki wiki-code data from remote server.
|
static java.lang.String |
get(java.lang.String address,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,java.lang.String> additionalHeaders)
Deprecated.
This method is moved to HttpConnectionUtils class.
|
static java.lang.String |
get(java.lang.String address,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,java.lang.String> additionalHeaders,
java.lang.String defaultOutputCharset)
Deprecated.
This method is moved to HttpConnectionUtils class.
|
static java.lang.String |
getURL(java.lang.String target)
Deprecated.
This method is moved to HttpConnectionUtils class.
|
static byte[] |
getURLasByteArray(java.lang.String target)
Deprecated.
This method is moved to HttpConnectionUtils class.
|
static java.lang.String |
joinString(java.lang.String separator,
java.lang.String[] items)
~inverse of String.split() refactor note: In future releases, this might
best be moved to a different file
|
static java.lang.String |
post(java.lang.String address,
java.util.Map<java.lang.String,java.lang.String> params)
Deprecated.
This method is moved to HttpConnectionUtils class.
|
static java.lang.String |
post(java.lang.String address,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,java.lang.String> additionalHeaders)
Deprecated.
This method is moved to HttpConnectionUtils class.
|
static java.lang.String |
postJSON(java.lang.String address,
java.lang.String json,
java.util.Map<java.lang.String,java.lang.String> additionalHeaders)
Deprecated.
This method is moved to HttpConnectionUtils class.
|
static void |
printUTF8(java.lang.String output)
Print UTF-8 text to stdout (useful for debugging)
|
static void |
saveUTF8(java.lang.String dir,
java.lang.String filename,
java.lang.String output)
Save UTF-8 format data to file.
|
static java.io.BufferedWriter |
utf8WriterBuilder(java.io.OutputStream out)
Creates new BufferedWriter configured for UTF-8 output and connects it to
an OutputStream
|
public static java.lang.String joinString(java.lang.String separator, java.lang.String[] items)
public static void doWikiGet(java.lang.String remoteUrl, java.lang.String projectdir) throws java.io.IOException
remoteUrl
- string representation of well-formed URL of wikipage to be
retrievedprojectdir
- string representation of path to the project-dir where the
file should be saved.java.io.IOException
public static void printUTF8(java.lang.String output)
output
- The UTF-8 format string to be printed.public static java.io.BufferedWriter utf8WriterBuilder(java.io.OutputStream out) throws java.lang.Exception
out
- Outputstream to connect to.java.lang.Exception
public static void saveUTF8(java.lang.String dir, java.lang.String filename, java.lang.String output)
dir
- directory to write to.filename
- filename of file to write.output
- UTF-8 format text to write@Deprecated public static java.lang.String getURL(java.lang.String target) throws java.io.IOException
target
- String representation of well-formed URL.java.io.IOException
@Deprecated public static byte[] getURLasByteArray(java.lang.String target) throws java.io.IOException
target
- String representation of well-formed URL.java.io.IOException
@Deprecated public static java.lang.String post(java.lang.String address, java.util.Map<java.lang.String,java.lang.String> params) throws java.io.IOException
java.io.IOException
@Deprecated public static java.lang.String get(java.lang.String address, java.util.Map<java.lang.String,java.lang.String> params, java.util.Map<java.lang.String,java.lang.String> additionalHeaders) throws java.io.IOException
address
- address to postparams
- parametersadditionalHeaders
- additional headers for request, can be nulljava.io.IOException
@Deprecated public static java.lang.String get(java.lang.String address, java.util.Map<java.lang.String,java.lang.String> params, java.util.Map<java.lang.String,java.lang.String> additionalHeaders, java.lang.String defaultOutputCharset) throws java.io.IOException
address
- address to postparams
- parametersadditionalHeaders
- additional headers for request, can be nulldefaultOutputCharset
- default charset used to interpret the responsejava.io.IOException
@Deprecated public static java.lang.String post(java.lang.String address, java.util.Map<java.lang.String,java.lang.String> params, java.util.Map<java.lang.String,java.lang.String> additionalHeaders) throws java.io.IOException
address
- address to postparams
- parametersadditionalHeaders
- additional headers for request, can be nulljava.io.IOException
@Deprecated public static java.lang.String postJSON(java.lang.String address, java.lang.String json, java.util.Map<java.lang.String,java.lang.String> additionalHeaders) throws java.io.IOException
address
- address to postjson
- JSON-encoded dataadditionalHeaders
- additional headers for request, can be nulljava.io.IOException