Files
2016-04-27 01:07:35 -04:00

595 lines
34 KiB
HTML

<!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_51) on Wed Apr 06 13:11:11 EDT 2016 -->
<title>Hex (Parallel Java 2 Library Documentation)</title>
<meta name="date" content="2016-04-06">
<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="Hex (Parallel Java 2 Library Documentation)";
}
//-->
</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/Hex.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-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../edu/rit/util/Heartbeat.html" title="class in edu.rit.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../edu/rit/util/IdentityMap.html" title="class in edu.rit.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?edu/rit/util/Hex.html" target="_top">Frames</a></li>
<li><a href="Hex.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>Constr&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>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">edu.rit.util</div>
<h2 title="Class Hex" class="title">Class Hex</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>edu.rit.util.Hex</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">Hex</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">Class Hex provides static methods for converting between hexadecimal strings
and numbers of various kinds.</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">&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 byte</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/Hex.html#toByte(java.lang.String)">toByte</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>&nbsp;str)</code>
<div class="block">Convert the given hexadecimal string to a <TT>byte</TT> value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/Hex.html#toByteArray(java.lang.String)">toByteArray</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>&nbsp;str)</code>
<div class="block">Convert the given hexadecimal string to a sequence of bytes stored in a
new <TT>byte</TT> array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/Hex.html#toByteArray(java.lang.String, byte[])">toByteArray</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>&nbsp;str,
byte[]&nbsp;val)</code>
<div class="block">Convert the given hexadecimal string to a sequence of bytes stored in the
given <TT>byte</TT> array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/Hex.html#toByteArray(java.lang.String, byte[], int, int)">toByteArray</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>&nbsp;str,
byte[]&nbsp;val,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Convert the given hexadecimal string to a sequence of bytes stored in a
portion of the given <TT>byte</TT> array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/Hex.html#toChar(java.lang.String)">toChar</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>&nbsp;str)</code>
<div class="block">Convert the given hexadecimal string to a <TT>char</TT> value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/Hex.html#toInt(java.lang.String)">toInt</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>&nbsp;str)</code>
<div class="block">Convert the given hexadecimal string to an <TT>int</TT> value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/Hex.html#toLong(java.lang.String)">toLong</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>&nbsp;str)</code>
<div class="block">Convert the given hexadecimal string to a <TT>long</TT> value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static short</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/Hex.html#toShort(java.lang.String)">toShort</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>&nbsp;str)</code>
<div class="block">Convert the given hexadecimal string to a <TT>short</TT> value.</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="../../../edu/rit/util/Hex.html#toString(byte)">toString</a></strong>(byte&nbsp;val)</code>
<div class="block">Convert the given <TT>byte</TT> value to a two-digit hexadecimal string.</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="../../../edu/rit/util/Hex.html#toString(byte[])">toString</a></strong>(byte[]&nbsp;val)</code>
<div class="block">Convert the given <TT>byte</TT> array to a hexadecimal string.</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="../../../edu/rit/util/Hex.html#toString(byte[], int, int)">toString</a></strong>(byte[]&nbsp;val,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Convert a portion of the given <TT>byte</TT> array to a hexadecimal
string.</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="../../../edu/rit/util/Hex.html#toString(char)">toString</a></strong>(char&nbsp;val)</code>
<div class="block">Convert the given <TT>char</TT> value to a four-digit hexadecimal string.</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="../../../edu/rit/util/Hex.html#toString(int)">toString</a></strong>(int&nbsp;val)</code>
<div class="block">Convert the given <TT>int</TT> value to an eight-digit hexadecimal
string.</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="../../../edu/rit/util/Hex.html#toString(long)">toString</a></strong>(long&nbsp;val)</code>
<div class="block">Convert the given <TT>long</TT> value to a sixteen-digit hexadecimal
string.</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="../../../edu/rit/util/Hex.html#toString(short)">toString</a></strong>(short&nbsp;val)</code>
<div class="block">Convert the given <TT>short</TT> value to a four-digit hexadecimal
string.</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">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="toString(byte)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</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;toString(byte&nbsp;val)</pre>
<div class="block">Convert the given <TT>byte</TT> value to a two-digit hexadecimal string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - Value.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Hexadecimal string.</dd></dl>
</li>
</ul>
<a name="toString(char)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</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;toString(char&nbsp;val)</pre>
<div class="block">Convert the given <TT>char</TT> value to a four-digit hexadecimal string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - Value.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Hexadecimal string.</dd></dl>
</li>
</ul>
<a name="toString(short)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</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;toString(short&nbsp;val)</pre>
<div class="block">Convert the given <TT>short</TT> value to a four-digit hexadecimal
string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - Value.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Hexadecimal string.</dd></dl>
</li>
</ul>
<a name="toString(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</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;toString(int&nbsp;val)</pre>
<div class="block">Convert the given <TT>int</TT> value to an eight-digit hexadecimal
string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - Value.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Hexadecimal string.</dd></dl>
</li>
</ul>
<a name="toString(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</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;toString(long&nbsp;val)</pre>
<div class="block">Convert the given <TT>long</TT> value to a sixteen-digit hexadecimal
string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - Value.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Hexadecimal string.</dd></dl>
</li>
</ul>
<a name="toString(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</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;toString(byte[]&nbsp;val)</pre>
<div class="block">Convert the given <TT>byte</TT> array to a hexadecimal string. Each byte
is converted to two hexadecimal digits.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - Byte array.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Hexadecimal string.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>val</TT> is null.</dd></dl>
</li>
</ul>
<a name="toString(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</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;toString(byte[]&nbsp;val,
int&nbsp;off,
int&nbsp;len)</pre>
<div class="block">Convert a portion of the given <TT>byte</TT> array to a hexadecimal
string. Each byte is converted to two hexadecimal digits.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - Byte array.</dd><dd><code>off</code> - Index of first byte to convert.</dd><dd><code>len</code> - Number of bytes to convert.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Hexadecimal string.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>val</TT> is null.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>off</TT> &lt; 0, <TT>len</TT>
&lt; 0, or <TT>off+len</TT> &gt; <TT>val.length</TT>.</dd></dl>
</li>
</ul>
<a name="toByte(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByte</h4>
<pre>public static&nbsp;byte&nbsp;toByte(<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;str)</pre>
<div class="block">Convert the given hexadecimal string to a <TT>byte</TT> value. Characters
of the string from the highest index to the lowest index give the
hexadecimal digits of the value from least significant digit to most
significant digit. Any extra high-order digits in the string are omitted.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - Hexadecimal string.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>str</TT> is null.</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> - (unchecked exception) Thrown if any character of the string is not a
hexadecimal digit (<TT>'0'</TT> .. <TT>'9'</TT>, <TT>'a'</TT> ..
<TT>'f'</TT>, or <TT>'A'</TT> .. <TT>'F'</TT>).</dd></dl>
</li>
</ul>
<a name="toChar(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toChar</h4>
<pre>public static&nbsp;char&nbsp;toChar(<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;str)</pre>
<div class="block">Convert the given hexadecimal string to a <TT>char</TT> value. Characters
of the string from the highest index to the lowest index give the
hexadecimal digits of the value from least significant digit to most
significant digit. Any extra high-order digits in the string are omitted.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - Hexadecimal string.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>str</TT> is null.</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> - (unchecked exception) Thrown if any character of the string is not a
hexadecimal digit (<TT>'0'</TT> .. <TT>'9'</TT>, <TT>'a'</TT> ..
<TT>'f'</TT>, or <TT>'A'</TT> .. <TT>'F'</TT>).</dd></dl>
</li>
</ul>
<a name="toShort(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toShort</h4>
<pre>public static&nbsp;short&nbsp;toShort(<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;str)</pre>
<div class="block">Convert the given hexadecimal string to a <TT>short</TT> value.
Characters of the string from the highest index to the lowest index give
the hexadecimal digits of the value from least significant digit to most
significant digit. Any extra high-order digits in the string are omitted.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - Hexadecimal string.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>str</TT> is null.</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> - (unchecked exception) Thrown if any character of the string is not a
hexadecimal digit (<TT>'0'</TT> .. <TT>'9'</TT>, <TT>'a'</TT> ..
<TT>'f'</TT>, or <TT>'A'</TT> .. <TT>'F'</TT>).</dd></dl>
</li>
</ul>
<a name="toInt(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInt</h4>
<pre>public static&nbsp;int&nbsp;toInt(<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;str)</pre>
<div class="block">Convert the given hexadecimal string to an <TT>int</TT> value. Characters
of the string from the highest index to the lowest index give the
hexadecimal digits of the value from least significant digit to most
significant digit. Any extra high-order digits in the string are omitted.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - Hexadecimal string.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>str</TT> is null.</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> - (unchecked exception) Thrown if any character of the string is not a
hexadecimal digit (<TT>'0'</TT> .. <TT>'9'</TT>, <TT>'a'</TT> ..
<TT>'f'</TT>, or <TT>'A'</TT> .. <TT>'F'</TT>).</dd></dl>
</li>
</ul>
<a name="toLong(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLong</h4>
<pre>public static&nbsp;long&nbsp;toLong(<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;str)</pre>
<div class="block">Convert the given hexadecimal string to a <TT>long</TT> value. Characters
of the string from the highest index to the lowest index give the
hexadecimal digits of the value from least significant digit to most
significant digit. Any extra high-order digits in the string are omitted.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - Hexadecimal string.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>str</TT> is null.</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> - (unchecked exception) Thrown if any character of the string is not a
hexadecimal digit (<TT>'0'</TT> .. <TT>'9'</TT>, <TT>'a'</TT> ..
<TT>'f'</TT>, or <TT>'A'</TT> .. <TT>'F'</TT>).</dd></dl>
</li>
</ul>
<a name="toByteArray(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<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;str)</pre>
<div class="block">Convert the given hexadecimal string to a sequence of bytes stored in a
new <TT>byte</TT> array. Characters of the string from the highest index
to the lowest index give the hexadecimal digits of the value from least
significant digit to most significant digit. The value is stored in a
newly allocated byte array, with the least significant byte stored at the
highest index and the most significant byte stored at the lowest index.
The array's length is sufficient to hold the entire converted string. The
newly allocated byte array is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - Hexadecimal string.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Value (byte array).</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>str</TT> is null.</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> - (unchecked exception) Thrown if any character of the string is not a
hexadecimal digit (<TT>'0'</TT> .. <TT>'9'</TT>, <TT>'a'</TT> ..
<TT>'f'</TT>, or <TT>'A'</TT> .. <TT>'F'</TT>).</dd></dl>
</li>
</ul>
<a name="toByteArray(java.lang.String, byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;void&nbsp;toByteArray(<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;str,
byte[]&nbsp;val)</pre>
<div class="block">Convert the given hexadecimal string to a sequence of bytes stored in the
given <TT>byte</TT> array. Characters of the string from the highest
index to the lowest index give the hexadecimal digits of the value from
least significant digit to most significant digit. The value is stored in
<TT>val</TT> from highest index to lowest index, with the least
significant byte stored at index <TT>val.length-1</TT>. If the converted
string requires more than <TT>val.length</TT> bytes, the extra digits at
the beginning of the string are not converted. If the converted string
requires fewer than <TT>val.length</TT> bytes, the extra bytes at the
beginning of <TT>val</TT> are set to 0.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - Hexadecimal string.</dd><dd><code>val</code> - Byte array in which to store converted value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>str</TT> is null or <TT>val</TT>
is null.</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> - (unchecked exception) Thrown if any character of the string is not a
hexadecimal digit (<TT>'0'</TT> .. <TT>'9'</TT>, <TT>'a'</TT> ..
<TT>'f'</TT>, or <TT>'A'</TT> .. <TT>'F'</TT>).</dd></dl>
</li>
</ul>
<a name="toByteArray(java.lang.String, byte[], int, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;void&nbsp;toByteArray(<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;str,
byte[]&nbsp;val,
int&nbsp;off,
int&nbsp;len)</pre>
<div class="block">Convert the given hexadecimal string to a sequence of bytes stored in a
portion of the given <TT>byte</TT> array. Characters of the string from
the highest index to the lowest index give the hexadecimal digits of the
value from least significant digit to most significant digit. The value
is stored in <TT>val</TT> from highest index to lowest index, with the
least significant byte stored at index <TT>off+len-1</TT>. If the
converted string requires more than <TT>len</TT> bytes, the extra digits
at the beginning of the string are not converted. If the converted string
requires fewer than <TT>len</TT> bytes, the extra bytes starting at index
<TT>off</TT> of <TT>val</TT> are set to 0.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - Hexadecimal string.</dd><dd><code>val</code> - Byte array in which to store converted value.</dd><dd><code>off</code> - Index of first byte to store.</dd><dd><code>len</code> - Number of bytes to store.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>str</TT> is null or <TT>val</TT>
is null.</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> - (unchecked exception) Thrown if <TT>off</TT> &lt; 0, <TT>len</TT>
&lt; 0, or <TT>off+len</TT> &gt; <TT>val.length</TT>. Thrown if any
character of the string is not a hexadecimal digit (<TT>'0'</TT> ..
<TT>'9'</TT>, <TT>'a'</TT> .. <TT>'f'</TT>, or <TT>'A'</TT> ..
<TT>'F'</TT>).</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/Hex.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-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../edu/rit/util/Heartbeat.html" title="class in edu.rit.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../edu/rit/util/IdentityMap.html" title="class in edu.rit.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?edu/rit/util/Hex.html" target="_top">Frames</a></li>
<li><a href="Hex.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>Constr&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>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><FONT SIZE="-2">Copyright &copy; 2013&ndash;2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">&#64;</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
</body>
</html>