blob: 0ab86dabd5636974a462acc3b649a7a114b2e6ae [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.7.0_251) on Sat May 02 18:30:36 PDT 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Bytes (Trafodion REST 2.4.0 API)</title>
<meta name="date" content="2020-05-02">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Bytes (Trafodion REST 2.4.0 API)";
}
}
catch(err) {
}
//-->
</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/Bytes.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/trafodion/rest/util/Base64.Base64OutputStream.html" title="class in org.trafodion.rest.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/trafodion/rest/util/ConfTool.html" title="class in org.trafodion.rest.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/trafodion/rest/util/Bytes.html" target="_top">Frames</a></li>
<li><a href="Bytes.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><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.trafodion.rest.util</div>
<h2 title="Class Bytes" class="title">Class Bytes</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.trafodion.rest.util.Bytes</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">Bytes</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">Utility class that handles byte arrays, conversions to/from other types,
comparisons, hash code generation, manufacturing keys for HashMaps or
HashSets, etc.</div>
</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="overviewSummary" 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 int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#ESTIMATED_HEAP_TAX">ESTIMATED_HEAP_TAX</a></strong></code>
<div class="block">Estimate of size cost to pay beyond payload in jvm for instance of byte [].</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_BOOLEAN">SIZEOF_BOOLEAN</a></strong></code>
<div class="block">Size of boolean in bytes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_BYTE">SIZEOF_BYTE</a></strong></code>
<div class="block">Size of byte in bytes</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_CHAR">SIZEOF_CHAR</a></strong></code>
<div class="block">Size of char in bytes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_DOUBLE">SIZEOF_DOUBLE</a></strong></code>
<div class="block">Size of double in bytes</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_FLOAT">SIZEOF_FLOAT</a></strong></code>
<div class="block">Size of float in bytes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_INT">SIZEOF_INT</a></strong></code>
<div class="block">Size of int in bytes</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_LONG">SIZEOF_LONG</a></strong></code>
<div class="block">Size of long in bytes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_SHORT">SIZEOF_SHORT</a></strong></code>
<div class="block">Size of short in bytes</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#Bytes()">Bytes</a></strong>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#bytesToVint(byte[])">bytesToVint</a></strong>(byte[]&nbsp;buffer)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#compareTo(byte[],%20byte[])">compareTo</a></strong>(byte[]&nbsp;left,
byte[]&nbsp;right)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#equals(byte[],%20byte[])">equals</a></strong>(byte[]&nbsp;left,
byte[]&nbsp;right)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#getBytes(java.nio.ByteBuffer)">getBytes</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>
<div class="block">This method will get a sequence of bytes from pos -> limit,
but will restore pos after.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#putBigDecimal(byte[],%20int,%20java.math.BigDecimal)">putBigDecimal</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;val)</code>
<div class="block">Put a BigDecimal value out to the specified byte array position.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#putByte(byte[],%20int,%20byte)">putByte</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
byte&nbsp;b)</code>
<div class="block">Write a single byte out to the specified byte array position.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#putBytes(byte[],%20int,%20byte[],%20int,%20int)">putBytes</a></strong>(byte[]&nbsp;tgtBytes,
int&nbsp;tgtOffset,
byte[]&nbsp;srcBytes,
int&nbsp;srcOffset,
int&nbsp;srcLength)</code>
<div class="block">Put bytes at the specified byte array position.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#putDouble(byte[],%20int,%20double)">putDouble</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
double&nbsp;d)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#putFloat(byte[],%20int,%20float)">putFloat</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
float&nbsp;f)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#putInt(byte[],%20int,%20int)">putInt</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;val)</code>
<div class="block">Put an int value out to the specified byte array position.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#putLong(byte[],%20int,%20long)">putLong</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
long&nbsp;val)</code>
<div class="block">Put a long value out to the specified byte array position.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#putShort(byte[],%20int,%20short)">putShort</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
short&nbsp;val)</code>
<div class="block">Put a short value out to the specified byte array position.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#readByteArray(java.io.DataInput)">readByteArray</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in)</code>
<div class="block">Read byte-array written with a WritableableUtils.vint prefix.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#readByteArrayThrowsRuntime(java.io.DataInput)">readByteArrayThrowsRuntime</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in)</code>
<div class="block">Read byte-array written with a WritableableUtils.vint prefix.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#readVLong(byte[],%20int)">readVLong</a></strong>(byte[]&nbsp;buffer,
int&nbsp;offset)</code>
<div class="block">Reads a zero-compressed encoded long from input stream and returns it.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBigDecimal(byte[])">toBigDecimal</a></strong>(byte[]&nbsp;bytes)</code>
<div class="block">Converts a byte array to a BigDecimal</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBigDecimal(byte[],%20int,%20int)">toBigDecimal</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to a BigDecimal value</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBinaryFromHex(byte)">toBinaryFromHex</a></strong>(byte&nbsp;ch)</code>
<div class="block">Takes a ASCII digit in the range A-F0-9 and returns
the corresponding integer/ordinal value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBoolean(byte[])">toBoolean</a></strong>(byte[]&nbsp;b)</code>
<div class="block">Reverses <a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(boolean)"><code>toBytes(boolean)</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(java.math.BigDecimal)">toBytes</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;val)</code>
<div class="block">Convert a BigDecimal value to a byte array</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(boolean)">toBytes</a></strong>(boolean&nbsp;b)</code>
<div class="block">Convert a boolean to a byte array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(java.nio.ByteBuffer)">toBytes</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;bb)</code>
<div class="block">Returns a new byte array, copied from the passed ByteBuffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(double)">toBytes</a></strong>(double&nbsp;d)</code>
<div class="block">Serialize a double as the IEEE 754 double format output.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(float)">toBytes</a></strong>(float&nbsp;f)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(int)">toBytes</a></strong>(int&nbsp;val)</code>
<div class="block">Convert an int value to a byte array</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(long)">toBytes</a></strong>(long&nbsp;val)</code>
<div class="block">Convert a long value to a byte array using big-endian.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(short)">toBytes</a></strong>(short&nbsp;val)</code>
<div class="block">Convert a short value to a byte array of <a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_SHORT"><code>SIZEOF_SHORT</code></a> bytes long.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(java.lang.String)">toBytes</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;s)</code>
<div class="block">Converts a string to a UTF-8 byte array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toBytesBinary(java.lang.String)">toBytesBinary</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;in)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toDouble(byte[])">toDouble</a></strong>(byte[]&nbsp;bytes)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toDouble(byte[],%20int)">toDouble</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toFloat(byte[])">toFloat</a></strong>(byte[]&nbsp;bytes)</code>
<div class="block">Presumes float encoded as IEEE 754 floating-point "single format"</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toFloat(byte[],%20int)">toFloat</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>
<div class="block">Presumes float encoded as IEEE 754 floating-point "single format"</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toInt(byte[])">toInt</a></strong>(byte[]&nbsp;bytes)</code>
<div class="block">Converts a byte array to an int value</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toInt(byte[],%20int)">toInt</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>
<div class="block">Converts a byte array to an int value</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toInt(byte[],%20int,%20int)">toInt</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to an int value</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toLong(byte[])">toLong</a></strong>(byte[]&nbsp;bytes)</code>
<div class="block">Converts a byte array to a long value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toLong(byte[],%20int)">toLong</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>
<div class="block">Converts a byte array to a long value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toLong(byte[],%20int,%20int)">toLong</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to a long value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static short</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toShort(byte[])">toShort</a></strong>(byte[]&nbsp;bytes)</code>
<div class="block">Converts a byte array to a short value</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static short</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toShort(byte[],%20int)">toShort</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>
<div class="block">Converts a byte array to a short value</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static short</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toShort(byte[],%20int,%20int)">toShort</a></strong>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to a short 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="../../../../org/trafodion/rest/util/Bytes.html#toString(byte[])">toString</a></strong>(byte[]&nbsp;b)</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><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toString(byte[],%20int,%20int)">toString</a></strong>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">This method will convert utf8 encoded bytes into a 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="../../../../org/trafodion/rest/util/Bytes.html#toString(byte[],%20java.lang.String,%20byte[])">toString</a></strong>(byte[]&nbsp;b1,
<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;sep,
byte[]&nbsp;b2)</code>
<div class="block">Joins two byte arrays together using a separator.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toStringBinary(byte[])">toStringBinary</a></strong>(byte[]&nbsp;b)</code>
<div class="block">Write a printable representation of a byte array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toStringBinary(byte[],%20int,%20int)">toStringBinary</a></strong>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Write a printable representation of a byte array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#toStringBinary(java.nio.ByteBuffer)">toStringBinary</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>
<div class="block">Converts the given byte buffer, from its array offset to its limit, to
a string.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#vintToBytes(long)">vintToBytes</a></strong>(long&nbsp;vint)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#writeByteArray(byte[],%20int,%20byte[],%20int,%20int)">writeByteArray</a></strong>(byte[]&nbsp;tgt,
int&nbsp;tgtOffset,
byte[]&nbsp;src,
int&nbsp;srcOffset,
int&nbsp;srcLength)</code>
<div class="block">Write byte-array from src to tgt with a vint length prefix.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#writeByteArray(java.io.DataOutput,%20byte[])">writeByteArray</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
byte[]&nbsp;b)</code>
<div class="block">Write byte-array with a WritableableUtils.vint prefix.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/trafodion/rest/util/Bytes.html#writeByteArray(java.io.DataOutput,%20byte[],%20int,%20int)">writeByteArray</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Write byte-array to out with a vint length prefix.</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,%20int)" 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="SIZEOF_BOOLEAN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_BOOLEAN</h4>
<pre>public static final&nbsp;int SIZEOF_BOOLEAN</pre>
<div class="block">Size of boolean in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.SIZEOF_BOOLEAN">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SIZEOF_BYTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_BYTE</h4>
<pre>public static final&nbsp;int SIZEOF_BYTE</pre>
<div class="block">Size of byte in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.SIZEOF_BYTE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SIZEOF_CHAR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_CHAR</h4>
<pre>public static final&nbsp;int SIZEOF_CHAR</pre>
<div class="block">Size of char in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.SIZEOF_CHAR">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SIZEOF_DOUBLE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_DOUBLE</h4>
<pre>public static final&nbsp;int SIZEOF_DOUBLE</pre>
<div class="block">Size of double in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.SIZEOF_DOUBLE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SIZEOF_FLOAT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_FLOAT</h4>
<pre>public static final&nbsp;int SIZEOF_FLOAT</pre>
<div class="block">Size of float in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.SIZEOF_FLOAT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SIZEOF_INT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_INT</h4>
<pre>public static final&nbsp;int SIZEOF_INT</pre>
<div class="block">Size of int in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.SIZEOF_INT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SIZEOF_LONG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_LONG</h4>
<pre>public static final&nbsp;int SIZEOF_LONG</pre>
<div class="block">Size of long in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.SIZEOF_LONG">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SIZEOF_SHORT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_SHORT</h4>
<pre>public static final&nbsp;int SIZEOF_SHORT</pre>
<div class="block">Size of short in bytes</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.SIZEOF_SHORT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ESTIMATED_HEAP_TAX">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ESTIMATED_HEAP_TAX</h4>
<pre>public static final&nbsp;int ESTIMATED_HEAP_TAX</pre>
<div class="block">Estimate of size cost to pay beyond payload in jvm for instance of byte [].
Estimate based on study of jhat and jprofiler numbers.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.trafodion.rest.util.Bytes.ESTIMATED_HEAP_TAX">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Bytes()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Bytes</h4>
<pre>public&nbsp;Bytes()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="readByteArray(java.io.DataInput)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;readByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in)
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 byte-array written with a WritableableUtils.vint prefix.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>in</code> - Input to read from.</dd>
<dt><span class="strong">Returns:</span></dt><dd>byte array read off <code>in</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - e</dd></dl>
</li>
</ul>
<a name="readByteArrayThrowsRuntime(java.io.DataInput)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readByteArrayThrowsRuntime</h4>
<pre>public static&nbsp;byte[]&nbsp;readByteArrayThrowsRuntime(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in)</pre>
<div class="block">Read byte-array written with a WritableableUtils.vint prefix.
IOException is converted to a RuntimeException.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>in</code> - Input to read from.</dd>
<dt><span class="strong">Returns:</span></dt><dd>byte array read off <code>in</code></dd></dl>
</li>
</ul>
<a name="writeByteArray(java.io.DataOutput, byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeByteArray</h4>
<pre>public static&nbsp;void&nbsp;writeByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
byte[]&nbsp;b)
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">Write byte-array with a WritableableUtils.vint prefix.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - output stream to be written to</dd><dd><code>b</code> - array to write</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - e</dd></dl>
</li>
</ul>
<a name="writeByteArray(java.io.DataOutput, byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeByteArray</h4>
<pre>public static&nbsp;void&nbsp;writeByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)
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">Write byte-array to out with a vint length prefix.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - output stream</dd><dd><code>b</code> - array</dd><dd><code>offset</code> - offset into array</dd><dd><code>length</code> - length past offset</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - e</dd></dl>
</li>
</ul>
<a name="writeByteArray(byte[], int, byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeByteArray</h4>
<pre>public static&nbsp;int&nbsp;writeByteArray(byte[]&nbsp;tgt,
int&nbsp;tgtOffset,
byte[]&nbsp;src,
int&nbsp;srcOffset,
int&nbsp;srcLength)</pre>
<div class="block">Write byte-array from src to tgt with a vint length prefix.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tgt</code> - target array</dd><dd><code>tgtOffset</code> - offset into target array</dd><dd><code>src</code> - source array</dd><dd><code>srcOffset</code> - source offset</dd><dd><code>srcLength</code> - source length</dd>
<dt><span class="strong">Returns:</span></dt><dd>New offset in src array.</dd></dl>
</li>
</ul>
<a name="putBytes(byte[], int, byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putBytes</h4>
<pre>public static&nbsp;int&nbsp;putBytes(byte[]&nbsp;tgtBytes,
int&nbsp;tgtOffset,
byte[]&nbsp;srcBytes,
int&nbsp;srcOffset,
int&nbsp;srcLength)</pre>
<div class="block">Put bytes at the specified byte array position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tgtBytes</code> - the byte array</dd><dd><code>tgtOffset</code> - position in the array</dd><dd><code>srcBytes</code> - array to write out</dd><dd><code>srcOffset</code> - source offset</dd><dd><code>srcLength</code> - source length</dd>
<dt><span class="strong">Returns:</span></dt><dd>incremented offset</dd></dl>
</li>
</ul>
<a name="putByte(byte[], int, byte)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putByte</h4>
<pre>public static&nbsp;int&nbsp;putByte(byte[]&nbsp;bytes,
int&nbsp;offset,
byte&nbsp;b)</pre>
<div class="block">Write a single byte out to the specified byte array position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - the byte array</dd><dd><code>offset</code> - position in the array</dd><dd><code>b</code> - byte to write out</dd>
<dt><span class="strong">Returns:</span></dt><dd>incremented offset</dd></dl>
</li>
</ul>
<a name="toBytes(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;bb)</pre>
<div class="block">Returns a new byte array, copied from the passed ByteBuffer.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bb</code> - A ByteBuffer</dd>
<dt><span class="strong">Returns:</span></dt><dd>the byte array</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;b)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - Presumed UTF-8 encoded byte array.</dd>
<dt><span class="strong">Returns:</span></dt><dd>String made from <code>b</code></dd></dl>
</li>
</ul>
<a name="toString(byte[], java.lang.String, 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;b1,
<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;sep,
byte[]&nbsp;b2)</pre>
<div class="block">Joins two byte arrays together using a separator.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b1</code> - The first byte array.</dd><dd><code>sep</code> - The separator to use.</dd><dd><code>b2</code> - The second byte array.</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;b,
int&nbsp;off,
int&nbsp;len)</pre>
<div class="block">This method will convert utf8 encoded bytes into a string. If
an UnsupportedEncodingException occurs, this method will eat it
and return null instead.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - Presumed UTF-8 encoded byte array.</dd><dd><code>off</code> - offset into array</dd><dd><code>len</code> - length of utf-8 sequence</dd>
<dt><span class="strong">Returns:</span></dt><dd>String made from <code>b</code> or null</dd></dl>
</li>
</ul>
<a name="toStringBinary(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toStringBinary</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;toStringBinary(byte[]&nbsp;b)</pre>
<div class="block">Write a printable representation of a byte array.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - byte array</dd>
<dt><span class="strong">Returns:</span></dt><dd>string</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/trafodion/rest/util/Bytes.html#toStringBinary(byte[],%20int,%20int)"><code>toStringBinary(byte[], int, int)</code></a></dd></dl>
</li>
</ul>
<a name="toStringBinary(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toStringBinary</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;toStringBinary(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<div class="block">Converts the given byte buffer, from its array offset to its limit, to
a string. The position and the mark are ignored.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - a byte buffer</dd>
<dt><span class="strong">Returns:</span></dt><dd>a string representation of the buffer's binary contents</dd></dl>
</li>
</ul>
<a name="toStringBinary(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toStringBinary</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;toStringBinary(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</pre>
<div class="block">Write a printable representation of a byte array. Non-printable
characters are hex escaped in the format \\x%02X, eg:
\x00 \x05 etc</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - array to write out</dd><dd><code>off</code> - offset to start at</dd><dd><code>len</code> - length to write</dd>
<dt><span class="strong">Returns:</span></dt><dd>string output</dd></dl>
</li>
</ul>
<a name="toBinaryFromHex(byte)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBinaryFromHex</h4>
<pre>public static&nbsp;byte&nbsp;toBinaryFromHex(byte&nbsp;ch)</pre>
<div class="block">Takes a ASCII digit in the range A-F0-9 and returns
the corresponding integer/ordinal value.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ch</code> - The hex digit.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The converted hex value as a byte.</dd></dl>
</li>
</ul>
<a name="toBytesBinary(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytesBinary</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytesBinary(<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;in)</pre>
</li>
</ul>
<a name="toBytes(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(<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;s)</pre>
<div class="block">Converts a string to a UTF-8 byte array.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>s</code> - string</dd>
<dt><span class="strong">Returns:</span></dt><dd>the byte array</dd></dl>
</li>
</ul>
<a name="toBytes(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(boolean&nbsp;b)</pre>
<div class="block">Convert a boolean to a byte array. True becomes -1
and false becomes 0.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - value</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>b</code> encoded in a byte array.</dd></dl>
</li>
</ul>
<a name="toBoolean(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBoolean</h4>
<pre>public static&nbsp;boolean&nbsp;toBoolean(byte[]&nbsp;b)</pre>
<div class="block">Reverses <a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(boolean)"><code>toBytes(boolean)</code></a></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - array</dd>
<dt><span class="strong">Returns:</span></dt><dd>True or false.</dd></dl>
</li>
</ul>
<a name="toBytes(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(long&nbsp;val)</pre>
<div class="block">Convert a long value to a byte array using big-endian.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - value to convert</dd>
<dt><span class="strong">Returns:</span></dt><dd>the byte array</dd></dl>
</li>
</ul>
<a name="toLong(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLong</h4>
<pre>public static&nbsp;long&nbsp;toLong(byte[]&nbsp;bytes)</pre>
<div class="block">Converts a byte array to a long value. Reverses
<a href="../../../../org/trafodion/rest/util/Bytes.html#toBytes(long)"><code>toBytes(long)</code></a></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - array</dd>
<dt><span class="strong">Returns:</span></dt><dd>the long value</dd></dl>
</li>
</ul>
<a name="toLong(byte[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLong</h4>
<pre>public static&nbsp;long&nbsp;toLong(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<div class="block">Converts a byte array to a long value. Assumes there will be
<a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_LONG"><code>SIZEOF_LONG</code></a> bytes available.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - bytes</dd><dd><code>offset</code> - offset</dd>
<dt><span class="strong">Returns:</span></dt><dd>the long value</dd></dl>
</li>
</ul>
<a name="toLong(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLong</h4>
<pre>public static&nbsp;long&nbsp;toLong(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to a long value.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - array of bytes</dd><dd><code>offset</code> - offset into array</dd><dd><code>length</code> - length of data (must be <a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_LONG"><code>SIZEOF_LONG</code></a>)</dd>
<dt><span class="strong">Returns:</span></dt><dd>the long value</dd>
<dt><span class="strong">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 length is not <a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_LONG"><code>SIZEOF_LONG</code></a> or
if there's not enough room in the array at the offset indicated.</dd></dl>
</li>
</ul>
<a name="putLong(byte[], int, long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putLong</h4>
<pre>public static&nbsp;int&nbsp;putLong(byte[]&nbsp;bytes,
int&nbsp;offset,
long&nbsp;val)</pre>
<div class="block">Put a long value out to the specified byte array position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - the byte array</dd><dd><code>offset</code> - position in the array</dd><dd><code>val</code> - long to write out</dd>
<dt><span class="strong">Returns:</span></dt><dd>incremented offset</dd>
<dt><span class="strong">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 the byte array given doesn't have
enough room at the offset specified.</dd></dl>
</li>
</ul>
<a name="toFloat(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toFloat</h4>
<pre>public static&nbsp;float&nbsp;toFloat(byte[]&nbsp;bytes)</pre>
<div class="block">Presumes float encoded as IEEE 754 floating-point "single format"</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd>
<dt><span class="strong">Returns:</span></dt><dd>Float made from passed byte array.</dd></dl>
</li>
</ul>
<a name="toFloat(byte[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toFloat</h4>
<pre>public static&nbsp;float&nbsp;toFloat(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<div class="block">Presumes float encoded as IEEE 754 floating-point "single format"</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - array to convert</dd><dd><code>offset</code> - offset into array</dd>
<dt><span class="strong">Returns:</span></dt><dd>Float made from passed byte array.</dd></dl>
</li>
</ul>
<a name="putFloat(byte[], int, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putFloat</h4>
<pre>public static&nbsp;int&nbsp;putFloat(byte[]&nbsp;bytes,
int&nbsp;offset,
float&nbsp;f)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd><dd><code>offset</code> - offset to write to</dd><dd><code>f</code> - float value</dd>
<dt><span class="strong">Returns:</span></dt><dd>New offset in <code>bytes</code></dd></dl>
</li>
</ul>
<a name="toBytes(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(float&nbsp;f)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>f</code> - float value</dd>
<dt><span class="strong">Returns:</span></dt><dd>the float represented as byte []</dd></dl>
</li>
</ul>
<a name="toDouble(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDouble</h4>
<pre>public static&nbsp;double&nbsp;toDouble(byte[]&nbsp;bytes)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd>
<dt><span class="strong">Returns:</span></dt><dd>Return double made from passed bytes.</dd></dl>
</li>
</ul>
<a name="toDouble(byte[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDouble</h4>
<pre>public static&nbsp;double&nbsp;toDouble(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd><dd><code>offset</code> - offset where double is</dd>
<dt><span class="strong">Returns:</span></dt><dd>Return double made from passed bytes.</dd></dl>
</li>
</ul>
<a name="putDouble(byte[], int, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putDouble</h4>
<pre>public static&nbsp;int&nbsp;putDouble(byte[]&nbsp;bytes,
int&nbsp;offset,
double&nbsp;d)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd><dd><code>offset</code> - offset to write to</dd><dd><code>d</code> - value</dd>
<dt><span class="strong">Returns:</span></dt><dd>New offset into array <code>bytes</code></dd></dl>
</li>
</ul>
<a name="toBytes(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(double&nbsp;d)</pre>
<div class="block">Serialize a double as the IEEE 754 double format output. The resultant
array will be 8 bytes long.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - value</dd>
<dt><span class="strong">Returns:</span></dt><dd>the double represented as byte []</dd></dl>
</li>
</ul>
<a name="toBytes(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(int&nbsp;val)</pre>
<div class="block">Convert an int value to a byte array</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - value</dd>
<dt><span class="strong">Returns:</span></dt><dd>the byte array</dd></dl>
</li>
</ul>
<a name="toInt(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInt</h4>
<pre>public static&nbsp;int&nbsp;toInt(byte[]&nbsp;bytes)</pre>
<div class="block">Converts a byte array to an int value</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd>
<dt><span class="strong">Returns:</span></dt><dd>the int value</dd></dl>
</li>
</ul>
<a name="toInt(byte[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInt</h4>
<pre>public static&nbsp;int&nbsp;toInt(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<div class="block">Converts a byte array to an int value</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd><dd><code>offset</code> - offset into array</dd>
<dt><span class="strong">Returns:</span></dt><dd>the int value</dd></dl>
</li>
</ul>
<a name="toInt(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInt</h4>
<pre>public static&nbsp;int&nbsp;toInt(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to an int value</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd><dd><code>offset</code> - offset into array</dd><dd><code>length</code> - length of int (has to be <a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_INT"><code>SIZEOF_INT</code></a>)</dd>
<dt><span class="strong">Returns:</span></dt><dd>the int value</dd>
<dt><span class="strong">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 length is not <a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_INT"><code>SIZEOF_INT</code></a> or
if there's not enough room in the array at the offset indicated.</dd></dl>
</li>
</ul>
<a name="putInt(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putInt</h4>
<pre>public static&nbsp;int&nbsp;putInt(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;val)</pre>
<div class="block">Put an int value out to the specified byte array position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - the byte array</dd><dd><code>offset</code> - position in the array</dd><dd><code>val</code> - int to write out</dd>
<dt><span class="strong">Returns:</span></dt><dd>incremented offset</dd>
<dt><span class="strong">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 the byte array given doesn't have
enough room at the offset specified.</dd></dl>
</li>
</ul>
<a name="toBytes(short)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(short&nbsp;val)</pre>
<div class="block">Convert a short value to a byte array of <a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_SHORT"><code>SIZEOF_SHORT</code></a> bytes long.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - value</dd>
<dt><span class="strong">Returns:</span></dt><dd>the byte array</dd></dl>
</li>
</ul>
<a name="toShort(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toShort</h4>
<pre>public static&nbsp;short&nbsp;toShort(byte[]&nbsp;bytes)</pre>
<div class="block">Converts a byte array to a short value</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd>
<dt><span class="strong">Returns:</span></dt><dd>the short value</dd></dl>
</li>
</ul>
<a name="toShort(byte[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toShort</h4>
<pre>public static&nbsp;short&nbsp;toShort(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<div class="block">Converts a byte array to a short value</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd><dd><code>offset</code> - offset into array</dd>
<dt><span class="strong">Returns:</span></dt><dd>the short value</dd></dl>
</li>
</ul>
<a name="toShort(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toShort</h4>
<pre>public static&nbsp;short&nbsp;toShort(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to a short value</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - byte array</dd><dd><code>offset</code> - offset into array</dd><dd><code>length</code> - length, has to be <a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_SHORT"><code>SIZEOF_SHORT</code></a></dd>
<dt><span class="strong">Returns:</span></dt><dd>the short value</dd>
<dt><span class="strong">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 length is not <a href="../../../../org/trafodion/rest/util/Bytes.html#SIZEOF_SHORT"><code>SIZEOF_SHORT</code></a>
or if there's not enough room in the array at the offset indicated.</dd></dl>
</li>
</ul>
<a name="getBytes(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;getBytes(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<div class="block">This method will get a sequence of bytes from pos -> limit,
but will restore pos after.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd>byte array</dd></dl>
</li>
</ul>
<a name="putShort(byte[], int, short)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putShort</h4>
<pre>public static&nbsp;int&nbsp;putShort(byte[]&nbsp;bytes,
int&nbsp;offset,
short&nbsp;val)</pre>
<div class="block">Put a short value out to the specified byte array position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - the byte array</dd><dd><code>offset</code> - position in the array</dd><dd><code>val</code> - short to write out</dd>
<dt><span class="strong">Returns:</span></dt><dd>incremented offset</dd>
<dt><span class="strong">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 the byte array given doesn't have
enough room at the offset specified.</dd></dl>
</li>
</ul>
<a name="toBytes(java.math.BigDecimal)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;toBytes(<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;val)</pre>
<div class="block">Convert a BigDecimal value to a byte array</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>val</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd>the byte array</dd></dl>
</li>
</ul>
<a name="toBigDecimal(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBigDecimal</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;toBigDecimal(byte[]&nbsp;bytes)</pre>
<div class="block">Converts a byte array to a BigDecimal</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd>the char value</dd></dl>
</li>
</ul>
<a name="toBigDecimal(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBigDecimal</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;toBigDecimal(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to a BigDecimal value</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - </dd><dd><code>offset</code> - </dd><dd><code>length</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd>the char value</dd></dl>
</li>
</ul>
<a name="putBigDecimal(byte[], int, java.math.BigDecimal)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putBigDecimal</h4>
<pre>public static&nbsp;int&nbsp;putBigDecimal(byte[]&nbsp;bytes,
int&nbsp;offset,
<a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;val)</pre>
<div class="block">Put a BigDecimal value out to the specified byte array position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - the byte array</dd><dd><code>offset</code> - position in the array</dd><dd><code>val</code> - BigDecimal to write out</dd>
<dt><span class="strong">Returns:</span></dt><dd>incremented offset</dd></dl>
</li>
</ul>
<a name="vintToBytes(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vintToBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;vintToBytes(long&nbsp;vint)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>vint</code> - Integer to make a vint of.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Vint as bytes array.</dd></dl>
</li>
</ul>
<a name="bytesToVint(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bytesToVint</h4>
<pre>public static&nbsp;long&nbsp;bytesToVint(byte[]&nbsp;buffer)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - buffer to convert</dd>
<dt><span class="strong">Returns:</span></dt><dd>vint bytes as an integer.</dd></dl>
</li>
</ul>
<a name="readVLong(byte[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readVLong</h4>
<pre>public static&nbsp;long&nbsp;readVLong(byte[]&nbsp;buffer,
int&nbsp;offset)
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">Reads a zero-compressed encoded long from input stream and returns it.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - Binary array</dd><dd><code>offset</code> - Offset into array at which vint begins.</dd>
<dt><span class="strong">Returns:</span></dt><dd>deserialized long from stream.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - e</dd></dl>
</li>
</ul>
<a name="compareTo(byte[], byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre>public static&nbsp;int&nbsp;compareTo(byte[]&nbsp;left,
byte[]&nbsp;right)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>left</code> - left operand</dd><dd><code>right</code> - right operand</dd>
<dt><span class="strong">Returns:</span></dt><dd>0 if equal, < 0 if left is less than right, etc.</dd></dl>
</li>
</ul>
<a name="equals(byte[], byte[])">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>equals</h4>
<pre>public static&nbsp;boolean&nbsp;equals(byte[]&nbsp;left,
byte[]&nbsp;right)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>left</code> - left operand</dd><dd><code>right</code> - right operand</dd>
<dt><span class="strong">Returns:</span></dt><dd>True if equal</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/Bytes.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/trafodion/rest/util/Base64.Base64OutputStream.html" title="class in org.trafodion.rest.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/trafodion/rest/util/ConfTool.html" title="class in org.trafodion.rest.util"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/trafodion/rest/util/Bytes.html" target="_top">Frames</a></li>
<li><a href="Bytes.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><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2020. All rights reserved.</small></p>
</body>
</html>