blob: a02424407b3435298054b125053a21e4cbc4009d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_07) on Tue Oct 02 13:04:15 CEST 2012 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>StringUtilities (Apache MINA 2.0.6 API)</title>
<meta name="date" content="2012-10-02">
<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="StringUtilities (Apache MINA 2.0.6 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="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StringUtilities.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/mina/proxy/utils/MD4Provider.html" title="class in org.apache.mina.proxy.utils"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/mina/proxy/utils/StringUtilities.html" target="_top">Frames</a></li>
<li><a href="StringUtilities.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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.mina.proxy.utils</div>
<h2 title="Class StringUtilities" class="title">Class StringUtilities</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/1.5.0/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.mina.proxy.utils.StringUtilities</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">StringUtilities</span>
extends <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">StringUtilities.java - Various methods to handle strings.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>MINA 2.0.0-M3</dd>
<dt><span class="strong">Author:</span></dt>
<dd><a href="http://mina.apache.org">Apache MINA Project</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/mina/proxy/utils/StringUtilities.html#StringUtilities()">StringUtilities</a></strong>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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">&nbsp;</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 void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/proxy/utils/StringUtilities.html#addValueToHeader(java.util.Map, java.lang.String, java.lang.String, boolean)">addValueToHeader</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt;&nbsp;headers,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value,
boolean&nbsp;singleValued)</code>
<div class="block">Adds an header to the provided map of headers.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://download.oracle.com/javase/1.5.0/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/mina/proxy/utils/StringUtilities.html#copyDirective(java.util.HashMap, java.util.HashMap, java.lang.String)">copyDirective</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;src,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;dst,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;directive)</code>
<div class="block">Copy the directive from the source map to the destination map, if it's
value isn't null.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/proxy/utils/StringUtilities.html#copyDirective(java.util.HashMap, java.lang.StringBuilder, java.lang.String)">copyDirective</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;directives,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a>&nbsp;sb,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;directive)</code>
<div class="block">Copy the directive to the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang"><code>StringBuilder</code></a> if not null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://download.oracle.com/javase/1.5.0/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/mina/proxy/utils/StringUtilities.html#getDirectiveValue(java.util.HashMap, java.lang.String, boolean)">getDirectiveValue</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;directivesMap,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;directive,
boolean&nbsp;mandatory)</code>
<div class="block">A directive is a parameter of the digest authentication process.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://download.oracle.com/javase/1.5.0/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/mina/proxy/utils/StringUtilities.html#getSingleValuedHeader(java.util.Map, java.lang.String)">getSingleValuedHeader</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt;&nbsp;headers,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>
<div class="block">Returns the value of the named header.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/proxy/utils/StringUtilities.html#isLws(byte)">isLws</a></strong>(byte&nbsp;b)</code>
<div class="block">Is character a linear white space ?
LWS = [CRLF] 1*( SP | HT )
Note that we're checking individual bytes instead of CRLF</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/mina/proxy/utils/StringUtilities.html#parseDirectives(byte[])">parseDirectives</a></strong>(byte[]&nbsp;buf)</code>
<div class="block">Parses digest-challenge string, extracting each token and value(s).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://download.oracle.com/javase/1.5.0/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/mina/proxy/utils/StringUtilities.html#stringTo8859_1(java.lang.String)">stringTo8859_1</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</code>
<div class="block">Used to convert username-value, passwd or realm to 8859_1 encoding
if all chars in string are within the 8859_1 (Latin 1) encoding range.</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&nbsp;java.lang.<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/1.5.0/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://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/1.5.0/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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="StringUtilities()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>StringUtilities</h4>
<pre>public&nbsp;StringUtilities()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getDirectiveValue(java.util.HashMap, java.lang.String, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDirectiveValue</h4>
<pre>public static&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getDirectiveValue(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;directivesMap,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;directive,
boolean&nbsp;mandatory)
throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/security/sasl/AuthenticationException.html?is-external=true" title="class or interface in javax.security.sasl">AuthenticationException</a></pre>
<div class="block">A directive is a parameter of the digest authentication process.
Returns the value of a directive from the map. If mandatory is true and the
value is null, then it throws an <a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/security/sasl/AuthenticationException.html?is-external=true" title="class or interface in javax.security.sasl"><code>AuthenticationException</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>directivesMap</code> - the directive's map</dd><dd><code>directive</code> - the name of the directive we want to retrieve</dd><dd><code>mandatory</code> - is the directive mandatory</dd>
<dt><span class="strong">Returns:</span></dt><dd>the mandatory value as a String</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/security/sasl/AuthenticationException.html?is-external=true" title="class or interface in javax.security.sasl">AuthenticationException</a></code> - if mandatory is true and if
directivesMap.get(directive) == null</dd></dl>
</li>
</ul>
<a name="copyDirective(java.util.HashMap, java.lang.StringBuilder, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyDirective</h4>
<pre>public static&nbsp;void&nbsp;copyDirective(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;directives,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a>&nbsp;sb,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;directive)</pre>
<div class="block">Copy the directive to the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang"><code>StringBuilder</code></a> if not null.
(A directive is a parameter of the digest authentication process.)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>directives</code> - the directives map</dd><dd><code>sb</code> - the output buffer</dd><dd><code>directive</code> - the directive name to look for</dd></dl>
</li>
</ul>
<a name="copyDirective(java.util.HashMap, java.util.HashMap, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyDirective</h4>
<pre>public static&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;copyDirective(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;src,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;dst,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;directive)</pre>
<div class="block">Copy the directive from the source map to the destination map, if it's
value isn't null.
(A directive is a parameter of the digest authentication process.)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>src</code> - the source map</dd><dd><code>dst</code> - the destination map</dd><dd><code>directive</code> - the directive name</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value of the copied directive</dd></dl>
</li>
</ul>
<a name="parseDirectives(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseDirectives</h4>
<pre>public static&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;parseDirectives(byte[]&nbsp;buf)
throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/security/sasl/SaslException.html?is-external=true" title="class or interface in javax.security.sasl">SaslException</a></pre>
<div class="block">Parses digest-challenge string, extracting each token and value(s). Each token
is a directive.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - A non-null digest-challenge string.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code></dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/security/sasl/SaslException.html?is-external=true" title="class or interface in javax.security.sasl">SaslException</a></code> - if the String cannot be parsed according to RFC 2831</dd></dl>
</li>
</ul>
<a name="isLws(byte)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLws</h4>
<pre>public static&nbsp;boolean&nbsp;isLws(byte&nbsp;b)</pre>
<div class="block">Is character a linear white space ?
LWS = [CRLF] 1*( SP | HT )
Note that we're checking individual bytes instead of CRLF</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - the byte to check</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if it's a linear white space</dd></dl>
</li>
</ul>
<a name="stringTo8859_1(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stringTo8859_1</h4>
<pre>public static&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;stringTo8859_1(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)
throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre>
<div class="block">Used to convert username-value, passwd or realm to 8859_1 encoding
if all chars in string are within the 8859_1 (Latin 1) encoding range.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - a non-null String</dd>
<dt><span class="strong">Returns:</span></dt><dd>a non-null String containing the 8859_1 encoded string</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/security/sasl/AuthenticationException.html?is-external=true" title="class or interface in javax.security.sasl">AuthenticationException</a></code></dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code></dd></dl>
</li>
</ul>
<a name="getSingleValuedHeader(java.util.Map, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSingleValuedHeader</h4>
<pre>public static&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getSingleValuedHeader(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt;&nbsp;headers,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
<div class="block">Returns the value of the named header. If it has multiple values
then an <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> is thrown</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>headers</code> - the http headers map</dd><dd><code>key</code> - the key of the header</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value of the http header</dd></dl>
</li>
</ul>
<a name="addValueToHeader(java.util.Map, java.lang.String, java.lang.String, boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>addValueToHeader</h4>
<pre>public static&nbsp;void&nbsp;addValueToHeader(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt;&nbsp;headers,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value,
boolean&nbsp;singleValued)</pre>
<div class="block">Adds an header to the provided map of headers.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>headers</code> - the http headers map</dd><dd><code>key</code> - the name of the new header to add</dd><dd><code>value</code> - the value of the added header</dd><dd><code>singleValued</code> - if true and the map already contains one value
then it is replaced by the new value. Otherwise it simply adds a new
value to this multi-valued header.</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="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StringUtilities.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/mina/proxy/utils/MD4Provider.html" title="class in org.apache.mina.proxy.utils"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/mina/proxy/utils/StringUtilities.html" target="_top">Frames</a></li>
<li><a href="StringUtilities.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2004-2012 <a href="http://mina.apache.org/">Apache MINA Project</a>. All Rights Reserved.</small></p>
</body>
</html>