blob: 351e226742b70dabc259fdf162813be1b24f6e1a [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 (1.8.0_66) on Fri Jan 15 14:33:43 CET 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BufferUtils (Apache Mina SSHD :: Core 1.1.0 API)</title>
<meta name="date" content="2016-01-15">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="BufferUtils (Apache Mina SSHD :: Core 1.1.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<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/BufferUtils.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/sshd/common/util/buffer/BufferException.html" title="class in org.apache.sshd.common.util.buffer"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/sshd/common/util/buffer/ByteArrayBuffer.html" title="class in org.apache.sshd.common.util.buffer"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/sshd/common/util/buffer/BufferUtils.html" target="_top">Frames</a></li>
<li><a href="BufferUtils.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;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><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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.sshd.common.util.buffer</div>
<h2 title="Class BufferUtils" class="title">Class BufferUtils</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.sshd.common.util.buffer.BufferUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">BufferUtils</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">TODO Add javadoc</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd><a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/sshd/common/util/Int2IntFunction.html" title="interface in org.apache.sshd.common.util">Int2IntFunction</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#DEFAULT_BUFFER_GROWTH_FACTOR">DEFAULT_BUFFER_GROWTH_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#DEFAULT_HEX_SEPARATOR">DEFAULT_HEX_SEPARATOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#EMPTY_HEX_SEPARATOR">EMPTY_HEX_SEPARATOR</a></span></code>&nbsp;</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><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#HEX_DIGITS">HEX_DIGITS</a></span></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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static &lt;B extends <a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer">Buffer</a>&gt;<br>B</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#clear-B-">clear</a></span>(B&nbsp;buffer)</code>
<div class="block">Invokes <a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html#clear--"><code>Buffer.clear()</code></a></div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#decodeHex-char-java.lang.CharSequence-">decodeHex</a></span>(char&nbsp;separator,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#decodeHex-char-java.lang.CharSequence-int-int-">decodeHex</a></span>(char&nbsp;separator,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq,
int&nbsp;start,
int&nbsp;end)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static &lt;S extends <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&gt;<br>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#decodeHex-S-char-java.lang.CharSequence-">decodeHex</a></span>(S&nbsp;stream,
char&nbsp;separator,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq)</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static &lt;S extends <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&gt;<br>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#decodeHex-S-char-java.lang.CharSequence-int-int-">decodeHex</a></span>(S&nbsp;stream,
char&nbsp;separator,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq,
int&nbsp;start,
int&nbsp;end)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#equals-byte:A-byte:A-">equals</a></span>(byte[]&nbsp;a1,
byte[]&nbsp;a2)</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#equals-byte:A-int-byte:A-int-int-">equals</a></span>(byte[]&nbsp;a1,
int&nbsp;a1Offset,
byte[]&nbsp;a2,
int&nbsp;a2Offset,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#fromHex-char-char-">fromHex</a></span>(char&nbsp;hi,
char&nbsp;lo)</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#getNextPowerOf2-int-">getNextPowerOf2</a></span>(int&nbsp;value)</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#getUInt-byte...-">getUInt</a></span>(byte...&nbsp;buf)</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#getUInt-byte:A-int-int-">getUInt</a></span>(byte[]&nbsp;buf,
int&nbsp;off,
int&nbsp;len)</code>&nbsp;</td>
</tr>
<tr id="i11" 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><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#printHex-byte...-">printHex</a></span>(byte...&nbsp;array)</code>&nbsp;</td>
</tr>
<tr id="i12" 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><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#printHex-byte:A-int-int-">printHex</a></span>(byte[]&nbsp;array,
int&nbsp;offset,
int&nbsp;len)</code>&nbsp;</td>
</tr>
<tr id="i13" 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><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#printHex-byte:A-int-int-char-">printHex</a></span>(byte[]&nbsp;array,
int&nbsp;offset,
int&nbsp;len,
char&nbsp;sep)</code>&nbsp;</td>
</tr>
<tr id="i14" 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><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#printHex-char-byte...-">printHex</a></span>(char&nbsp;sep,
byte...&nbsp;array)</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#putUInt-long-byte:A-">putUInt</a></span>(long&nbsp;value,
byte[]&nbsp;buf)</code>
<div class="block">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#putUInt-long-byte:A-int-int-">putUInt</a></span>(long&nbsp;value,
byte[]&nbsp;buf,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#readInt-java.io.InputStream-byte:A-">readInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buf)</code>
<div class="block">Read a 32-bit value in network order</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#readInt-java.io.InputStream-byte:A-int-int-">readInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buf,
int&nbsp;offset,
int&nbsp;len)</code>
<div class="block">Read a 32-bit value in network order</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#readUInt-java.io.InputStream-byte:A-">readUInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buf)</code>
<div class="block">Read a 32-bit value in network order</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#readUInt-java.io.InputStream-byte:A-int-int-">readUInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buf,
int&nbsp;offset,
int&nbsp;len)</code>
<div class="block">Read a 32-bit value in network order</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#updateLengthPlaceholder-org.apache.sshd.common.util.buffer.Buffer-int-">updateLengthPlaceholder</a></span>(<a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer">Buffer</a>&nbsp;buffer,
int&nbsp;lenPos)</code>
<div class="block">Used for encodings where we don't know the data length before adding it
to the buffer.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#updateLengthPlaceholder-org.apache.sshd.common.util.buffer.Buffer-int-int-">updateLengthPlaceholder</a></span>(<a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer">Buffer</a>&nbsp;buffer,
int&nbsp;lenPos,
int&nbsp;dataLength)</code>
<div class="block">Updates a 32-bit &quot;placeholder&quot; location for data length - moves
the write position to the specified placeholder position, updates the length
value and then moves the write position it back to its original value.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#writeInt-java.io.OutputStream-int-byte:A-">writeInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
int&nbsp;value,
byte[]&nbsp;buf)</code>
<div class="block">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#writeInt-java.io.OutputStream-int-byte:A-int-int-">writeInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
int&nbsp;value,
byte[]&nbsp;buf,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#writeUInt-java.io.OutputStream-long-byte:A-">writeUInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
long&nbsp;value,
byte[]&nbsp;buf)</code>
<div class="block">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#writeUInt-java.io.OutputStream-long-byte:A-int-int-">writeUInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
long&nbsp;value,
byte[]&nbsp;buf,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Writes a 32-bit value in network order (i.e., MSB 1st)</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://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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_HEX_SEPARATOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_HEX_SEPARATOR</h4>
<pre>public static final&nbsp;char DEFAULT_HEX_SEPARATOR</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.sshd.common.util.buffer.BufferUtils.DEFAULT_HEX_SEPARATOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="EMPTY_HEX_SEPARATOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EMPTY_HEX_SEPARATOR</h4>
<pre>public static final&nbsp;char EMPTY_HEX_SEPARATOR</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.sshd.common.util.buffer.BufferUtils.EMPTY_HEX_SEPARATOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="HEX_DIGITS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HEX_DIGITS</h4>
<pre>public static final&nbsp;<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> HEX_DIGITS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.sshd.common.util.buffer.BufferUtils.HEX_DIGITS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_BUFFER_GROWTH_FACTOR">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_BUFFER_GROWTH_FACTOR</h4>
<pre>public static final&nbsp;<a href="../../../../../../org/apache/sshd/common/util/Int2IntFunction.html" title="interface in org.apache.sshd.common.util">Int2IntFunction</a> DEFAULT_BUFFER_GROWTH_FACTOR</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="printHex-byte...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printHex</h4>
<pre>public static&nbsp;<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>&nbsp;printHex(byte...&nbsp;array)</pre>
</li>
</ul>
<a name="printHex-char-byte...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printHex</h4>
<pre>public static&nbsp;<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>&nbsp;printHex(char&nbsp;sep,
byte...&nbsp;array)</pre>
</li>
</ul>
<a name="printHex-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printHex</h4>
<pre>public static&nbsp;<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>&nbsp;printHex(byte[]&nbsp;array,
int&nbsp;offset,
int&nbsp;len)</pre>
</li>
</ul>
<a name="printHex-byte:A-int-int-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printHex</h4>
<pre>public static&nbsp;<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>&nbsp;printHex(byte[]&nbsp;array,
int&nbsp;offset,
int&nbsp;len,
char&nbsp;sep)</pre>
</li>
</ul>
<a name="decodeHex-char-java.lang.CharSequence-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeHex</h4>
<pre>public static&nbsp;byte[]&nbsp;decodeHex(char&nbsp;separator,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>separator</code> - The separator between the HEX values - may be <a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#EMPTY_HEX_SEPARATOR"><code>EMPTY_HEX_SEPARATOR</code></a></dd>
<dd><code>csq</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> containing the HEX encoded bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The decoded bytes</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If invalid HEX sequence length</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang">NumberFormatException</a></code> - If invalid HEX characters found</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#decodeHex-char-java.lang.CharSequence-int-int-"><code>decodeHex(char, CharSequence, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeHex-char-java.lang.CharSequence-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeHex</h4>
<pre>public static&nbsp;byte[]&nbsp;decodeHex(char&nbsp;separator,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq,
int&nbsp;start,
int&nbsp;end)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>separator</code> - The separator between the HEX values - may be <a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#EMPTY_HEX_SEPARATOR"><code>EMPTY_HEX_SEPARATOR</code></a></dd>
<dd><code>csq</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> containing the HEX encoded bytes</dd>
<dd><code>start</code> - Start offset of the HEX sequence (inclusive)</dd>
<dd><code>end</code> - End offset of the HEX sequence (exclusive)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The decoded bytes</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If invalid HEX sequence length</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang">NumberFormatException</a></code> - If invalid HEX characters found</dd>
</dl>
</li>
</ul>
<a name="decodeHex-java.io.OutputStream-char-java.lang.CharSequence-">
<!-- -->
</a><a name="decodeHex-S-char-java.lang.CharSequence-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeHex</h4>
<pre>public static&nbsp;&lt;S extends <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&gt;&nbsp;int&nbsp;decodeHex(S&nbsp;stream,
char&nbsp;separator,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq)
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>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>S</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a> generic type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>stream</code> - The target <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a></dd>
<dd><code>separator</code> - The separator between the HEX values - may be <a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#EMPTY_HEX_SEPARATOR"><code>EMPTY_HEX_SEPARATOR</code></a></dd>
<dd><code>csq</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> containing the HEX encoded bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of bytes written to the stream</dd>
<dt><span class="throwsLabel">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 failed to write</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If invalid HEX sequence length</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang">NumberFormatException</a></code> - If invalid HEX characters found</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#decodeHex-S-char-java.lang.CharSequence-int-int-"><code>decodeHex(OutputStream, char, CharSequence, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeHex-java.io.OutputStream-char-java.lang.CharSequence-int-int-">
<!-- -->
</a><a name="decodeHex-S-char-java.lang.CharSequence-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeHex</h4>
<pre>public static&nbsp;&lt;S extends <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&gt;&nbsp;int&nbsp;decodeHex(S&nbsp;stream,
char&nbsp;separator,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;csq,
int&nbsp;start,
int&nbsp;end)
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>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>S</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a> generic type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>stream</code> - The target <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a></dd>
<dd><code>separator</code> - The separator between the HEX values - may be <a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#EMPTY_HEX_SEPARATOR"><code>EMPTY_HEX_SEPARATOR</code></a></dd>
<dd><code>csq</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> containing the HEX encoded bytes</dd>
<dd><code>start</code> - Start offset of the HEX sequence (inclusive)</dd>
<dd><code>end</code> - End offset of the HEX sequence (exclusive)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of bytes written to the stream</dd>
<dt><span class="throwsLabel">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 failed to write</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If invalid HEX sequence length</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang">NumberFormatException</a></code> - If invalid HEX characters found</dd>
</dl>
</li>
</ul>
<a name="fromHex-char-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromHex</h4>
<pre>public static&nbsp;byte&nbsp;fromHex(char&nbsp;hi,
char&nbsp;lo)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang">NumberFormatException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang">NumberFormatException</a></code></dd>
</dl>
</li>
</ul>
<a name="readInt-java.io.InputStream-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readInt</h4>
<pre>public static&nbsp;int&nbsp;readInt(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buf)
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">Read a 32-bit value in network order</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a></dd>
<dd><code>buf</code> - Work buffer to use</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The read 32-bit value</dd>
<dt><span class="throwsLabel">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 failed to read 4 bytes or not enough room in</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#readInt-java.io.InputStream-byte:A-int-int-"><code>readInt(InputStream, byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="readInt-java.io.InputStream-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readInt</h4>
<pre>public static&nbsp;int&nbsp;readInt(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buf,
int&nbsp;offset,
int&nbsp;len)
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">Read a 32-bit value in network order</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a></dd>
<dd><code>buf</code> - Work buffer to use</dd>
<dd><code>offset</code> - Offset in buffer to us</dd>
<dd><code>len</code> - Available length - must have at least 4 bytes available</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The read 32-bit value</dd>
<dt><span class="throwsLabel">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 failed to read 4 bytes or not enough room in
work buffer</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#readUInt-java.io.InputStream-byte:A-int-int-"><code>readUInt(InputStream, byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="readUInt-java.io.InputStream-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUInt</h4>
<pre>public static&nbsp;long&nbsp;readUInt(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buf)
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">Read a 32-bit value in network order</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a></dd>
<dd><code>buf</code> - Work buffer to use</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The read 32-bit value</dd>
<dt><span class="throwsLabel">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 failed to read 4 bytes or not enough room in</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#readUInt-java.io.InputStream-byte:A-int-int-"><code>readUInt(InputStream, byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="readUInt-java.io.InputStream-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUInt</h4>
<pre>public static&nbsp;long&nbsp;readUInt(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input,
byte[]&nbsp;buf,
int&nbsp;offset,
int&nbsp;len)
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">Read a 32-bit value in network order</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a></dd>
<dd><code>buf</code> - Work buffer to use</dd>
<dd><code>offset</code> - Offset in buffer to us</dd>
<dd><code>len</code> - Available length - must have at least 4 bytes available</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The read 32-bit value</dd>
<dt><span class="throwsLabel">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 failed to read 4 bytes or not enough room in
work buffer</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#getUInt-byte:A-int-int-"><code>getUInt(byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="getUInt-byte...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUInt</h4>
<pre>public static&nbsp;long&nbsp;getUInt(byte...&nbsp;buf)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buf</code> - A buffer holding a 32-bit unsigned integer in <B>big endian</B>
format. <B>Note:</B> if more than 4 bytes are available, then only the
<U>first</U> 4 bytes in the buffer will be used</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The result as a <code>long</code> whose 32 high-order bits are zero</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#getUInt-byte:A-int-int-"><code>getUInt(byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="getUInt-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUInt</h4>
<pre>public static&nbsp;long&nbsp;getUInt(byte[]&nbsp;buf,
int&nbsp;off,
int&nbsp;len)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buf</code> - A buffer holding a 32-bit unsigned integer in <B>big endian</B>
format.</dd>
<dd><code>off</code> - The offset of the data in the buffer</dd>
<dd><code>len</code> - The available data length. <B>Note:</B> if more than 4 bytes
are available, then only the <U>first</U> 4 bytes in the buffer will be
used (starting at the specified <tt>offset</tt>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The result as a <code>long</code> whose 32 high-order bits are zero</dd>
</dl>
</li>
</ul>
<a name="writeInt-java.io.OutputStream-int-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeInt</h4>
<pre>public static&nbsp;void&nbsp;writeInt(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
int&nbsp;value,
byte[]&nbsp;buf)
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">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>output</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a> to write the value</dd>
<dd><code>value</code> - The 32-bit value</dd>
<dd><code>buf</code> - A work buffer to use - must have enough space to contain 4 bytes</dd>
<dt><span class="throwsLabel">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 failed to write the value or work buffer to small</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#writeInt-java.io.OutputStream-int-byte:A-int-int-"><code>writeInt(OutputStream, int, byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="writeInt-java.io.OutputStream-int-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeInt</h4>
<pre>public static&nbsp;void&nbsp;writeInt(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
int&nbsp;value,
byte[]&nbsp;buf,
int&nbsp;off,
int&nbsp;len)
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">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>output</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a> to write the value</dd>
<dd><code>value</code> - The 32-bit value</dd>
<dd><code>buf</code> - A work buffer to use - must have enough space to contain 4 bytes</dd>
<dd><code>off</code> - The offset to write the value</dd>
<dd><code>len</code> - The available space</dd>
<dt><span class="throwsLabel">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 failed to write the value or work buffer to small</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#writeUInt-java.io.OutputStream-long-byte:A-int-int-"><code>writeUInt(OutputStream, long, byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="writeUInt-java.io.OutputStream-long-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeUInt</h4>
<pre>public static&nbsp;void&nbsp;writeUInt(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
long&nbsp;value,
byte[]&nbsp;buf)
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">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>output</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a> to write the value</dd>
<dd><code>value</code> - The 32-bit value</dd>
<dd><code>buf</code> - A work buffer to use - must have enough space to contain 4 bytes</dd>
<dt><span class="throwsLabel">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 failed to write the value or work buffer to small</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#writeUInt-java.io.OutputStream-long-byte:A-int-int-"><code>writeUInt(OutputStream, long, byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="writeUInt-java.io.OutputStream-long-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeUInt</h4>
<pre>public static&nbsp;void&nbsp;writeUInt(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;output,
long&nbsp;value,
byte[]&nbsp;buf,
int&nbsp;off,
int&nbsp;len)
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">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>output</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a> to write the value</dd>
<dd><code>value</code> - The 32-bit value</dd>
<dd><code>buf</code> - A work buffer to use - must have enough space to contain 4 bytes</dd>
<dd><code>off</code> - The offset to write the value</dd>
<dd><code>len</code> - The available space</dd>
<dt><span class="throwsLabel">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 failed to write the value or work buffer to small</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#putUInt-long-byte:A-int-int-"><code>putUInt(long, byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="putUInt-long-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putUInt</h4>
<pre>public static&nbsp;int&nbsp;putUInt(long&nbsp;value,
byte[]&nbsp;buf)</pre>
<div class="block">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The 32-bit value</dd>
<dd><code>buf</code> - The buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of bytes used in the buffer</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if not enough space available</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/sshd/common/util/buffer/BufferUtils.html#putUInt-long-byte:A-int-int-"><code>putUInt(long, byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="putUInt-long-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putUInt</h4>
<pre>public static&nbsp;int&nbsp;putUInt(long&nbsp;value,
byte[]&nbsp;buf,
int&nbsp;off,
int&nbsp;len)</pre>
<div class="block">Writes a 32-bit value in network order (i.e., MSB 1st)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The 32-bit value</dd>
<dd><code>buf</code> - The buffer</dd>
<dd><code>off</code> - The offset to write the value</dd>
<dd><code>len</code> - The available space</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of bytes used in the buffer</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if not enough space available</dd>
</dl>
</li>
</ul>
<a name="equals-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public static&nbsp;boolean&nbsp;equals(byte[]&nbsp;a1,
byte[]&nbsp;a2)</pre>
</li>
</ul>
<a name="equals-byte:A-int-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public static&nbsp;boolean&nbsp;equals(byte[]&nbsp;a1,
int&nbsp;a1Offset,
byte[]&nbsp;a2,
int&nbsp;a2Offset,
int&nbsp;length)</pre>
</li>
</ul>
<a name="getNextPowerOf2-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextPowerOf2</h4>
<pre>public static&nbsp;int&nbsp;getNextPowerOf2(int&nbsp;value)</pre>
</li>
</ul>
<a name="updateLengthPlaceholder-org.apache.sshd.common.util.buffer.Buffer-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateLengthPlaceholder</h4>
<pre>public static&nbsp;int&nbsp;updateLengthPlaceholder(<a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer">Buffer</a>&nbsp;buffer,
int&nbsp;lenPos)</pre>
<div class="block">Used for encodings where we don't know the data length before adding it
to the buffer. The idea is to place a 32-bit &quot;placeholder&quot;,
encode the data and then return back to the placeholder and update the
length. The method calculates the encoded data length, moves the write
position to the specified placeholder position, updates the length value
and then moves the write position it back to its original value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - The <a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer"><code>Buffer</code></a></dd>
<dd><code>lenPos</code> - The offset in the buffer where the length placeholder is
to be update - <B>Note:</B> assumption is that the encoded data starts
<U>immediately</U> after the placeholder</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The amount of data that has been encoded</dd>
</dl>
</li>
</ul>
<a name="updateLengthPlaceholder-org.apache.sshd.common.util.buffer.Buffer-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateLengthPlaceholder</h4>
<pre>public static&nbsp;void&nbsp;updateLengthPlaceholder(<a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer">Buffer</a>&nbsp;buffer,
int&nbsp;lenPos,
int&nbsp;dataLength)</pre>
<div class="block">Updates a 32-bit &quot;placeholder&quot; location for data length - moves
the write position to the specified placeholder position, updates the length
value and then moves the write position it back to its original value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - The <a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer"><code>Buffer</code></a></dd>
<dd><code>lenPos</code> - The offset in the buffer where the length placeholder is
to be update - <B>Note:</B> assumption is that the encoded data starts
<U>immediately</U> after the placeholder</dd>
<dd><code>dataLength</code> - The length to update</dd>
</dl>
</li>
</ul>
<a name="clear-org.apache.sshd.common.util.buffer.Buffer-">
<!-- -->
</a><a name="clear-B-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clear</h4>
<pre>public static&nbsp;&lt;B extends <a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer">Buffer</a>&gt;&nbsp;B&nbsp;clear(B&nbsp;buffer)</pre>
<div class="block">Invokes <a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html#clear--"><code>Buffer.clear()</code></a></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>B</code> - The generic buffer type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - A <a href="../../../../../../org/apache/sshd/common/util/buffer/Buffer.html" title="class in org.apache.sshd.common.util.buffer"><code>Buffer</code></a> instance - ignored if <code>null</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The same as the input instance</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>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<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/BufferUtils.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/sshd/common/util/buffer/BufferException.html" title="class in org.apache.sshd.common.util.buffer"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/sshd/common/util/buffer/ByteArrayBuffer.html" title="class in org.apache.sshd.common.util.buffer"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/sshd/common/util/buffer/BufferUtils.html" target="_top">Frames</a></li>
<li><a href="BufferUtils.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;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><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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; 2008&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>