| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="de"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_25) on Mon Jul 01 12:09:01 CEST 2013 --> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>WebConsoleUtil (Apache Felix Web Management Console 3.0.0 API)</title> |
| <meta name="date" content="2013-07-01"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="WebConsoleUtil (Apache Felix Web Management Console 3.0.0 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../org/apache/felix/webconsole/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/WebConsoleUtil.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/felix/webconsole/WebConsoleConstants.html" title="interface in org.apache.felix.webconsole"><span class="strong">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/felix/webconsole/WebConsoleUtil.html" target="_top">Frames</a></li> |
| <li><a href="WebConsoleUtil.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.felix.webconsole</div> |
| <h2 title="Class WebConsoleUtil" class="title">Class WebConsoleUtil</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.felix.webconsole.WebConsoleUtil</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public final class <span class="strong">WebConsoleUtil</span> |
| extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">The <code>WebConsoleUtil</code> provides various utility methods for use |
| by Web Console plugins.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#escapeHtml(java.lang.String)">escapeHtml</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code> |
| <div class="block">Escapes HTML special chars like: <>&\r\n and space</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#getParameter(javax.servlet.http.HttpServletRequest, java.lang.String)">getParameter</a></strong>(javax.servlet.http.HttpServletRequest request, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> |
| <div class="block">An utility method, that is used to filter out simple parameter from file |
| parameter when multipart transfer encoding is used.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#getParameterInt(javax.servlet.http.HttpServletRequest, java.lang.String, int)">getParameterInt</a></strong>(javax.servlet.http.HttpServletRequest request, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| int _default)</code> |
| <div class="block">Retrieves a request parameter and converts it to int.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole">VariableResolver</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#getVariableResolver(javax.servlet.ServletRequest)">getVariableResolver</a></strong>(javax.servlet.ServletRequest request)</code> |
| <div class="block">Returns the <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole"><code>VariableResolver</code></a> for the given request.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#keyVal(org.json.JSONWriter, java.lang.String, java.lang.Object)">keyVal</a></strong>(org.json.JSONWriter jw, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> |
| <div class="block">Writes a key-value pair in a JSON writer.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#sendRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)">sendRedirect</a></strong>(javax.servlet.http.HttpServletRequest request, |
| javax.servlet.http.HttpServletResponse response, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> redirectUrl)</code> |
| <div class="block">Utility method to handle relative redirects.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#setNoCache(javax.servlet.http.HttpServletResponse)">setNoCache</a></strong>(javax.servlet.http.HttpServletResponse response)</code> |
| <div class="block">Sets response headers to force the client to not cache the response |
| sent back.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#setVariableResolver(javax.servlet.ServletRequest, org.apache.felix.webconsole.VariableResolver)">setVariableResolver</a></strong>(javax.servlet.ServletRequest request, |
| <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole">VariableResolver</a> resolver)</code> |
| <div class="block">Sets the <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole"><code>VariableResolver</code></a> as the |
| <a href="../../../../org/apache/felix/webconsole/WebConsoleConstants.html#ATTR_CONSOLE_VARIABLE_RESOLVER"><code>WebConsoleConstants.ATTR_CONSOLE_VARIABLE_RESOLVER</code></a> |
| attribute in the given request.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/felix/webconsole/WebConsoleUtil.html#urlDecode(java.lang.String)">urlDecode</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> |
| <div class="block">Decode the given value expected to be URL encoded.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getVariableResolver(javax.servlet.ServletRequest)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVariableResolver</h4> |
| <pre>public static <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole">VariableResolver</a> getVariableResolver(javax.servlet.ServletRequest request)</pre> |
| <div class="block">Returns the <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole"><code>VariableResolver</code></a> for the given request. |
| <p> |
| If no resolver has yet be created for the requests, an instance of the |
| <a href="../../../../org/apache/felix/webconsole/DefaultVariableResolver.html" title="class in org.apache.felix.webconsole"><code>DefaultVariableResolver</code></a> is created with preset properties, |
| placed into the request and returned. The preset properties are |
| <code>appRoot</code> set to the value of the |
| <a href="../../../../org/apache/felix/webconsole/WebConsoleConstants.html#ATTR_APP_ROOT"><code>WebConsoleConstants.ATTR_APP_ROOT</code></a> request attribute and |
| <code>pluginRoot</code> set to the value of the |
| <a href="../../../../org/apache/felix/webconsole/WebConsoleConstants.html#ATTR_PLUGIN_ROOT"><code>WebConsoleConstants.ATTR_PLUGIN_ROOT</code></a> request attribute. |
| <p> |
| <b>Note</b>: An object not implementing the <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole"><code>VariableResolver</code></a> |
| interface already stored as the |
| <a href="../../../../org/apache/felix/webconsole/WebConsoleConstants.html#ATTR_CONSOLE_VARIABLE_RESOLVER"><code>WebConsoleConstants.ATTR_CONSOLE_VARIABLE_RESOLVER</code></a> attribute |
| will silently be replaced by the <a href="../../../../org/apache/felix/webconsole/DefaultVariableResolver.html" title="class in org.apache.felix.webconsole"><code>DefaultVariableResolver</code></a> |
| instance.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - The request whose attribute is returned (or set)</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole"><code>VariableResolver</code></a> for the given request.</dd></dl> |
| </li> |
| </ul> |
| <a name="setVariableResolver(javax.servlet.ServletRequest, org.apache.felix.webconsole.VariableResolver)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setVariableResolver</h4> |
| <pre>public static void setVariableResolver(javax.servlet.ServletRequest request, |
| <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole">VariableResolver</a> resolver)</pre> |
| <div class="block">Sets the <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole"><code>VariableResolver</code></a> as the |
| <a href="../../../../org/apache/felix/webconsole/WebConsoleConstants.html#ATTR_CONSOLE_VARIABLE_RESOLVER"><code>WebConsoleConstants.ATTR_CONSOLE_VARIABLE_RESOLVER</code></a> |
| attribute in the given request. An attribute of that name already |
| existing is silently replaced.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - The request whose attribute is set</dd><dd><code>resolver</code> - The <a href="../../../../org/apache/felix/webconsole/VariableResolver.html" title="interface in org.apache.felix.webconsole"><code>VariableResolver</code></a> to place into the request</dd></dl> |
| </li> |
| </ul> |
| <a name="getParameter(javax.servlet.http.HttpServletRequest, java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getParameter</h4> |
| <pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getParameter(javax.servlet.http.HttpServletRequest request, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> |
| <div class="block">An utility method, that is used to filter out simple parameter from file |
| parameter when multipart transfer encoding is used. |
| |
| This method processes the request and sets a request attribute |
| <a href="../../../../org/apache/felix/webconsole/AbstractWebConsolePlugin.html#ATTR_FILEUPLOAD"><code>AbstractWebConsolePlugin.ATTR_FILEUPLOAD</code></a>. The attribute value is a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> |
| where the key is a String specifying the field name and the value |
| is a <code>FileItem</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the HTTP request coming from the user</dd><dd><code>name</code> - the name of the parameter</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>if not multipart transfer encoding is used - the value is the |
| parameter value or <code>null</code> if not set. If multipart is used, |
| and the specified parameter is field - then the value of the parameter |
| is returned.</dd></dl> |
| </li> |
| </ul> |
| <a name="sendRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendRedirect</h4> |
| <pre>public static final void sendRedirect(javax.servlet.http.HttpServletRequest request, |
| javax.servlet.http.HttpServletResponse response, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> redirectUrl) |
| throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Utility method to handle relative redirects. |
| Some application servers like Web Sphere handle relative redirects differently |
| therefore we should make an absolute URL before invoking send redirect.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the HTTP request coming from the user</dd><dd><code>response</code> - the HTTP response, where data is rendered</dd><dd><code>redirectUrl</code> - the redirect URI.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an input or output exception occurs</dd> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If the response was committed or if a partial |
| URL is given and cannot be converted into a valid URL</dd></dl> |
| </li> |
| </ul> |
| <a name="setNoCache(javax.servlet.http.HttpServletResponse)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setNoCache</h4> |
| <pre>public static final void setNoCache(javax.servlet.http.HttpServletResponse response)</pre> |
| <div class="block">Sets response headers to force the client to not cache the response |
| sent back. This method must be called before the response is committed |
| otherwise it will have no effect. |
| <p> |
| This method sets the <code>Cache-Control</code>, <code>Expires</code>, |
| and <code>Pragma</code> headers.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>response</code> - The response for which to set the cache prevention</dd></dl> |
| </li> |
| </ul> |
| <a name="escapeHtml(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>escapeHtml</h4> |
| <pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> escapeHtml(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre> |
| <div class="block">Escapes HTML special chars like: <>&\r\n and space</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - the text to escape</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the escaped text</dd></dl> |
| </li> |
| </ul> |
| <a name="getParameterInt(javax.servlet.http.HttpServletRequest, java.lang.String, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getParameterInt</h4> |
| <pre>public static final int getParameterInt(javax.servlet.http.HttpServletRequest request, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| int _default)</pre> |
| <div class="block">Retrieves a request parameter and converts it to int.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - the HTTP request</dd><dd><code>name</code> - the name of the request parameter</dd><dd><code>_default</code> - the default value returned if the parameter is not set or is not a valid integer.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the request parameter if set and is valid integer, or the default value</dd></dl> |
| </li> |
| </ul> |
| <a name="keyVal(org.json.JSONWriter, java.lang.String, java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>keyVal</h4> |
| <pre>public static final void keyVal(org.json.JSONWriter jw, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value) |
| throws org.json.JSONException</pre> |
| <div class="block">Writes a key-value pair in a JSON writer. Write is performed only if both key and |
| value are not null.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>jw</code> - the writer, where to write the data</dd><dd><code>key</code> - the key value, stored under 'key'</dd><dd><code>value</code> - the value stored under 'value'</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code>org.json.JSONException</code> - if the value cannot be serialized.</dd></dl> |
| </li> |
| </ul> |
| <a name="urlDecode(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>urlDecode</h4> |
| <pre>public static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> urlDecode(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> |
| <div class="block">Decode the given value expected to be URL encoded. |
| <p> |
| This method first tries to use the Java 1.4 method |
| <code>URLDecoder.decode(String, String)</code> method and falls back to |
| the now deprecated <code>URLDecoder.decode(String, String)</code> |
| which uses the platform character set to decode the string. This is |
| because the platforms before 1.4 and most notably some OSGi Execution |
| Environments (such as Minimum EE) do not provide the newer method.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - </dd> |
| <dt><span class="strong">Returns:</span></dt><dd></dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../org/apache/felix/webconsole/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/WebConsoleUtil.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/felix/webconsole/WebConsoleConstants.html" title="interface in org.apache.felix.webconsole"><span class="strong">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/felix/webconsole/WebConsoleUtil.html" target="_top">Frames</a></li> |
| <li><a href="WebConsoleUtil.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2006–2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |