blob: d5aa86493f0acdba16bd5856630e2da655731b7b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_262-internal) on Thu Jun 04 16:39:43 GMT 2020 -->
<title>DecimalData (OpenJ9 Data Access Acceleration Classes)</title>
<meta name="date" content="2020-06-04">
<meta name="keywords" content="com.ibm.dataaccess.DecimalData class">
<meta name="keywords" content="EBCDIC_SIGN_EMBEDDED_TRAILING">
<meta name="keywords" content="EBCDIC_SIGN_EMBEDDED_LEADING">
<meta name="keywords" content="EBCDIC_SIGN_SEPARATE_TRAILING">
<meta name="keywords" content="EBCDIC_SIGN_SEPARATE_LEADING">
<meta name="keywords" content="UNICODE_UNSIGNED">
<meta name="keywords" content="UNICODE_SIGN_SEPARATE_LEADING">
<meta name="keywords" content="UNICODE_SIGN_SEPARATE_TRAILING">
<meta name="keywords" content="convertIntegerToPackedDecimal()">
<meta name="keywords" content="convertIntegerToExternalDecimal()">
<meta name="keywords" content="convertIntegerToUnicodeDecimal()">
<meta name="keywords" content="convertLongToPackedDecimal()">
<meta name="keywords" content="convertLongToExternalDecimal()">
<meta name="keywords" content="convertLongToUnicodeDecimal()">
<meta name="keywords" content="convertPackedDecimalToInteger()">
<meta name="keywords" content="convertPackedDecimalToLong()">
<meta name="keywords" content="convertPackedDecimalToExternalDecimal()">
<meta name="keywords" content="convertPackedDecimalToUnicodeDecimal()">
<meta name="keywords" content="convertPackedDecimalToBigInteger()">
<meta name="keywords" content="convertPackedDecimalToBigDecimal()">
<meta name="keywords" content="convertExternalDecimalToInteger()">
<meta name="keywords" content="convertExternalDecimalToLong()">
<meta name="keywords" content="convertExternalDecimalToPackedDecimal()">
<meta name="keywords" content="convertExternalDecimalToBigInteger()">
<meta name="keywords" content="convertExternalDecimalToBigDecimal()">
<meta name="keywords" content="convertUnicodeDecimalToInteger()">
<meta name="keywords" content="convertUnicodeDecimalToLong()">
<meta name="keywords" content="convertUnicodeDecimalToPackedDecimal()">
<meta name="keywords" content="convertUnicodeDecimalToBigInteger()">
<meta name="keywords" content="convertUnicodeDecimalToBigDecimal()">
<meta name="keywords" content="convertBigIntegerToPackedDecimal()">
<meta name="keywords" content="convertBigIntegerToExternalDecimal()">
<meta name="keywords" content="convertBigIntegerToUnicodeDecimal()">
<meta name="keywords" content="convertBigDecimalToPackedDecimal()">
<meta name="keywords" content="convertBigDecimalToExternalDecimal()">
<meta name="keywords" content="convertBigDecimalToUnicodeDecimal()">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DecimalData (OpenJ9 Data Access Acceleration Classes)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../com/ibm/dataaccess/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DecimalData.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 class="aboutLanguage"><strong>OpenJ9 Data Access Acceleration Classes</strong></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/ibm/dataaccess/ByteArrayUnmarshaller.html" title="class in com.ibm.dataaccess"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/ibm/dataaccess/PackedDecimal.html" title="class in com.ibm.dataaccess"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/ibm/dataaccess/DecimalData.html" target="_top">Frames</a></li>
<li><a href="DecimalData.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.ibm.dataaccess</div>
<h2 title="Class DecimalData" class="title">Class DecimalData</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.ibm.dataaccess.DecimalData</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">DecimalData</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">Object</a></pre>
<div class="block">Routines to convert between decimal data types stored in byte arrays and Java binary types.
<p>
All the converter routines require the precision of the decimal value to convert, which represents the number of
decimal digits in the decimal value, not including the sign.
</p>
<p>
Unicode Decimal values can be represented as either a char array or as a byte array where every Unicode character is
represented by a pair of adjacent bytes.
</p>
<p>
For embedded sign nibbles (4 bit integers representing values between <code>0x0</code> and <code>0xF</code>
inclusive) in External Decimal or Packed Decimal data, <code>0xB</code> and <code>0xD</code> represent a negative
sign. All other sign nibble values represent a positive sign. For operations that produce an External Decimal or
Packed Decimal result, the Data Access Accelerator library inserts the preferred positive sign code of
<code>0xC</code> if the result is positive, and a preferred negative sign code of <code>0xD</code> if the result is
negative. All values between <code>0x0</code> and <code>0xF</code> inclusive are interpreted as valid sign codes.
</p>
<p>
This library has full support for signed integers but only limited support for scale points (decimals). Scale points
and other unrecognized characters found in input External, Unicode, or Packed Decimal byte arrays are not supported,
and may cause IllegalArgumentExceptions or undefined results. BigDecimal <i>inputs</i> will have scale ignored (i.e.
-1.23 will be interpreted as -123). When converting to BigDecimal (as <i>output</i>), a scale value may be explicitly
specified as a separate parameter.
</p></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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#EBCDIC_SIGN_EMBEDDED_LEADING">EBCDIC_SIGN_EMBEDDED_LEADING</a></span></code>
<div class="block">External Decimal data format where each byte is an EBCDIC character representing a decimal digit, the sign is
encoded in the top nibble of the first byte.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#EBCDIC_SIGN_EMBEDDED_TRAILING">EBCDIC_SIGN_EMBEDDED_TRAILING</a></span></code>
<div class="block">External Decimal data format where each byte is an EBCDIC character representing a decimal digit, the sign is
encoded in the top nibble of the last byte.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#EBCDIC_SIGN_SEPARATE_LEADING">EBCDIC_SIGN_SEPARATE_LEADING</a></span></code>
<div class="block">External Decimal data format where each byte is an EBCDIC character representing a decimal digit, the sign is
encoded in a separate byte that comes before the first byte of the number.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#EBCDIC_SIGN_SEPARATE_TRAILING">EBCDIC_SIGN_SEPARATE_TRAILING</a></span></code>
<div class="block">External Decimal data format where each byte is an EBCDIC character representing a decimal digit, the sign is
encoded in a separate byte that comes after the last byte of the number.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#UNICODE_SIGN_SEPARATE_LEADING">UNICODE_SIGN_SEPARATE_LEADING</a></span></code>
<div class="block">Unicode Decimal data format where each digit is a Unicode character, the sign is stored in the first character.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#UNICODE_SIGN_SEPARATE_TRAILING">UNICODE_SIGN_SEPARATE_TRAILING</a></span></code>
<div class="block">Unicode Decimal data format where each digit is a Unicode character, the sign is stored in the last character.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#UNICODE_UNSIGNED">UNICODE_UNSIGNED</a></span></code>
<div class="block">Unicode Decimal data format where each digit is a Unicode character, there is no sign.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertBigDecimalToExternalDecimal-java.math.BigDecimal-byte:A-int-int-boolean-int-">convertBigDecimalToExternalDecimal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;bigDecimalValue,
byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts a BigDecimal value to an External Decimal in a byte array
Overflow can happen if the BigDecimal does not fit into the result byte array.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertBigDecimalToPackedDecimal-java.math.BigDecimal-byte:A-int-int-boolean-">convertBigDecimalToPackedDecimal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;bigDecimalValue,
byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</code>
<div class="block">Converts a BigDecimal into a Packed Decimal in a byte array
Overflow can happen if the BigDecimal does not fit into the result byte array.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertBigDecimalToUnicodeDecimal-java.math.BigDecimal-char:A-int-int-boolean-int-">convertBigDecimalToUnicodeDecimal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;bigDecimalValue,
char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts a BigDecimal value to a Unicode Decimal in a char array
Overflow can happen if the BigDecimal does not fit into the result char array.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertBigIntegerToExternalDecimal-java.math.BigInteger-byte:A-int-int-boolean-int-">convertBigIntegerToExternalDecimal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;bigIntegerValue,
byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts a BigInteger value into an External Decimal in a byte array
Overflow can happen if the BigInteger does not fit into the byte array.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertBigIntegerToPackedDecimal-java.math.BigInteger-byte:A-int-int-boolean-">convertBigIntegerToPackedDecimal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;bigIntegerValue,
byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</code>
<div class="block">Converts a BigInteger value into a Packed Decimal in a byte array
Overflow can happen if the BigInteger does not fit into the byte array.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertBigIntegerToUnicodeDecimal-java.math.BigInteger-char:A-int-int-boolean-int-">convertBigIntegerToUnicodeDecimal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;bigIntegerValue,
char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts a BigInteger value to a Unicode Decimal in a char array
Overflow can happen if the BigInteger does not fit into the char array.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertExternalDecimalToBigDecimal-byte:A-int-int-int-boolean-int-">convertExternalDecimalToBigDecimal</a></span>(byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
int&nbsp;scale,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts an External Decimal in a byte array to a BigDecimal.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertExternalDecimalToBigInteger-byte:A-int-int-boolean-int-">convertExternalDecimalToBigInteger</a></span>(byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Convert an External Decimal in a byte array to a BigInteger.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertExternalDecimalToInteger-byte:A-int-int-boolean-int-">convertExternalDecimalToInteger</a></span>(byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts an External Decimal value in a byte array into a binary integer.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertExternalDecimalToLong-byte:A-int-int-boolean-int-">convertExternalDecimalToLong</a></span>(byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts an External Decimal value in a byte array into a long.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertExternalDecimalToPackedDecimal-byte:A-int-byte:A-int-int-int-">convertExternalDecimalToPackedDecimal</a></span>(byte[]&nbsp;externalDecimal,
int&nbsp;externalOffset,
byte[]&nbsp;packedDecimal,
int&nbsp;packedOffset,
int&nbsp;precision,
int&nbsp;decimalType)</code>
<div class="block">Converts an External Decimal in a byte array to a Packed Decimal in another byte array.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertIntegerToExternalDecimal-int-byte:A-int-int-boolean-int-">convertIntegerToExternalDecimal</a></span>(int&nbsp;integerValue,
byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts an integer to an External Decimal in a byte array.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertIntegerToPackedDecimal-int-byte:A-int-int-boolean-">convertIntegerToPackedDecimal</a></span>(int&nbsp;integerValue,
byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</code>
<div class="block">Converts a binary integer value into a signed Packed Decimal format.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertIntegerToUnicodeDecimal-int-char:A-int-int-boolean-int-">convertIntegerToUnicodeDecimal</a></span>(int&nbsp;integerValue,
char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkoverflow,
int&nbsp;unicodeType)</code>
<div class="block">Converts an integer to a Unicode Decimal in a char array
Overflow can happen if the resulting External Decimal value does not fit into the char array, given the offset and
precision.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertLongToExternalDecimal-long-byte:A-int-int-boolean-int-">convertLongToExternalDecimal</a></span>(long&nbsp;longValue,
byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts a long into an External Decimal in a byte array.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertLongToPackedDecimal-long-byte:A-int-int-boolean-">convertLongToPackedDecimal</a></span>(long&nbsp;longValue,
byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</code>
<div class="block">Converts a binary long value into signed Packed Decimal format.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertLongToUnicodeDecimal-long-char:A-int-int-boolean-int-">convertLongToUnicodeDecimal</a></span>(long&nbsp;longValue,
char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts a long to a Unicode Decimal in a char array
Overflow can happen if the resulting Unicode Decimal value does not fit into the char array, given its precision
and offset .</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertPackedDecimalToBigDecimal-byte:A-int-int-int-boolean-">convertPackedDecimalToBigDecimal</a></span>(byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
int&nbsp;scale,
boolean&nbsp;checkOverflow)</code>
<div class="block">Convert a Packed Decimal in a byte array to a BigDecimal.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertPackedDecimalToBigInteger-byte:A-int-int-boolean-">convertPackedDecimalToBigInteger</a></span>(byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</code>
<div class="block">Convert a Packed Decimal in a byte array to a BigInteger.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertPackedDecimalToExternalDecimal-byte:A-int-byte:A-int-int-int-">convertPackedDecimalToExternalDecimal</a></span>(byte[]&nbsp;packedDecimal,
int&nbsp;packedOffset,
byte[]&nbsp;externalDecimal,
int&nbsp;externalOffset,
int&nbsp;precision,
int&nbsp;decimalType)</code>
<div class="block">Converts a Packed Decimal in a byte array into an External Decimal in another byte array.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertPackedDecimalToInteger-byte:A-int-int-boolean-">convertPackedDecimalToInteger</a></span>(byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</code>
<div class="block">Converts a Packed Decimal value in a byte array into a binary integer.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertPackedDecimalToLong-byte:A-int-int-boolean-">convertPackedDecimalToLong</a></span>(byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</code>
<div class="block">Converts a Packed Decimal value in a byte array into a binary long.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertPackedDecimalToUnicodeDecimal-byte:A-int-char:A-int-int-int-">convertPackedDecimalToUnicodeDecimal</a></span>(byte[]&nbsp;packedDecimal,
int&nbsp;packedOffset,
char[]&nbsp;unicodeDecimal,
int&nbsp;unicodeOffset,
int&nbsp;precision,
int&nbsp;decimalType)</code>
<div class="block">Convert a Packed Decimal in a byte array to a Unicode Decimal in a char array.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertUnicodeDecimalToBigDecimal-char:A-int-int-int-boolean-int-">convertUnicodeDecimalToBigDecimal</a></span>(char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
int&nbsp;scale,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Converts a Unicode Decimal in a char array to a BigDecimal.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertUnicodeDecimalToBigInteger-char:A-int-int-boolean-int-">convertUnicodeDecimalToBigInteger</a></span>(char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</code>
<div class="block">Convert a Unicode Decimal in a char array to a BigInteger.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertUnicodeDecimalToInteger-char:A-int-int-boolean-int-">convertUnicodeDecimalToInteger</a></span>(char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;unicodeType)</code>
<div class="block">Converts a Unicode Decimal value in a char array into a binary integer.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertUnicodeDecimalToLong-char:A-int-int-boolean-int-">convertUnicodeDecimalToLong</a></span>(char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;unicodeType)</code>
<div class="block">Converts a Unicode Decimal value in a char array into a binary long.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/dataaccess/DecimalData.html#convertUnicodeDecimalToPackedDecimal-char:A-int-byte:A-int-int-int-">convertUnicodeDecimalToPackedDecimal</a></span>(char[]&nbsp;unicodeDecimal,
int&nbsp;unicodeOffset,
byte[]&nbsp;packedDecimal,
int&nbsp;packedOffset,
int&nbsp;precision,
int&nbsp;decimalType)</code>
<div class="block">Converts an Unicode Decimal in a char array to a Packed Decimal in a byte array.</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="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="EBCDIC_SIGN_EMBEDDED_TRAILING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EBCDIC_SIGN_EMBEDDED_TRAILING</h4>
<pre>public static final&nbsp;int EBCDIC_SIGN_EMBEDDED_TRAILING</pre>
<div class="block">External Decimal data format where each byte is an EBCDIC character representing a decimal digit, the sign is
encoded in the top nibble of the last byte.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.ibm.dataaccess.DecimalData.EBCDIC_SIGN_EMBEDDED_TRAILING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="EBCDIC_SIGN_EMBEDDED_LEADING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EBCDIC_SIGN_EMBEDDED_LEADING</h4>
<pre>public static final&nbsp;int EBCDIC_SIGN_EMBEDDED_LEADING</pre>
<div class="block">External Decimal data format where each byte is an EBCDIC character representing a decimal digit, the sign is
encoded in the top nibble of the first byte.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.ibm.dataaccess.DecimalData.EBCDIC_SIGN_EMBEDDED_LEADING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="EBCDIC_SIGN_SEPARATE_TRAILING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EBCDIC_SIGN_SEPARATE_TRAILING</h4>
<pre>public static final&nbsp;int EBCDIC_SIGN_SEPARATE_TRAILING</pre>
<div class="block">External Decimal data format where each byte is an EBCDIC character representing a decimal digit, the sign is
encoded in a separate byte that comes after the last byte of the number.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.ibm.dataaccess.DecimalData.EBCDIC_SIGN_SEPARATE_TRAILING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="EBCDIC_SIGN_SEPARATE_LEADING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EBCDIC_SIGN_SEPARATE_LEADING</h4>
<pre>public static final&nbsp;int EBCDIC_SIGN_SEPARATE_LEADING</pre>
<div class="block">External Decimal data format where each byte is an EBCDIC character representing a decimal digit, the sign is
encoded in a separate byte that comes before the first byte of the number.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.ibm.dataaccess.DecimalData.EBCDIC_SIGN_SEPARATE_LEADING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="UNICODE_UNSIGNED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UNICODE_UNSIGNED</h4>
<pre>public static final&nbsp;int UNICODE_UNSIGNED</pre>
<div class="block">Unicode Decimal data format where each digit is a Unicode character, there is no sign.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.ibm.dataaccess.DecimalData.UNICODE_UNSIGNED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="UNICODE_SIGN_SEPARATE_LEADING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UNICODE_SIGN_SEPARATE_LEADING</h4>
<pre>public static final&nbsp;int UNICODE_SIGN_SEPARATE_LEADING</pre>
<div class="block">Unicode Decimal data format where each digit is a Unicode character, the sign is stored in the first character.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.ibm.dataaccess.DecimalData.UNICODE_SIGN_SEPARATE_LEADING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="UNICODE_SIGN_SEPARATE_TRAILING">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>UNICODE_SIGN_SEPARATE_TRAILING</h4>
<pre>public static final&nbsp;int UNICODE_SIGN_SEPARATE_TRAILING</pre>
<div class="block">Unicode Decimal data format where each digit is a Unicode character, the sign is stored in the last character.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.ibm.dataaccess.DecimalData.UNICODE_SIGN_SEPARATE_TRAILING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="convertIntegerToPackedDecimal-int-byte:A-int-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertIntegerToPackedDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertIntegerToPackedDecimal(int&nbsp;integerValue,
byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</pre>
<div class="block">Converts a binary integer value into a signed Packed Decimal format. The Packed Decimal will be padded with zeros
on the left if necessary.
Overflow can happen if the resulting Packed Decimal does not fit into the result byte array, given the offset and
precision. In this case, when <code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown,
when false a truncated or invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>integerValue</code> - the binary integer value to convert</dd>
<dd><code>packedDecimal</code> - byte array that will store the resulting Packed Decimal value</dd>
<dd><code>offset</code> - offset of the first byte of the Packed Decimal in <code>packedDecimal</code></dd>
<dd><code>precision</code> - number of Packed Decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if the <code>checkOverflow</code> parameter is true and overflow occurs</dd>
</dl>
</li>
</ul>
<a name="convertIntegerToExternalDecimal-int-byte:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertIntegerToExternalDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertIntegerToExternalDecimal(int&nbsp;integerValue,
byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts an integer to an External Decimal in a byte array. The External Decimal will be padded with zeros on the
left if necessary.
Overflow can happen if the resulting External Decimal value does not fit into the byte array, given the precision
and offset. In this case, when <code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown,
when false a truncated or invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>integerValue</code> - the value to convert</dd>
<dd><code>externalDecimal</code> - the byte array which will hold the External Decimal on a successful return</dd>
<dd><code>offset</code> - the offset in the byte array at which the External Decimal should be located</dd>
<dd><code>precision</code> - the number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code>will be thrown if the designated array cannot hold the
External Decimal.</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if the <code>checkOverflow</code> parameter is true and overflow occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>decimalType</code> or <code>precision</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertIntegerToUnicodeDecimal-int-char:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertIntegerToUnicodeDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertIntegerToUnicodeDecimal(int&nbsp;integerValue,
char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkoverflow,
int&nbsp;unicodeType)</pre>
<div class="block">Converts an integer to a Unicode Decimal in a char array
Overflow can happen if the resulting External Decimal value does not fit into the char array, given the offset and
precision. In this case, when <code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown,
when false a truncated or invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>integerValue</code> - the long value to convert</dd>
<dd><code>unicodeDecimal</code> - the char array which will hold the Unicode Decimal on a successful return</dd>
<dd><code>offset</code> - the offset in the char array where the Unicode Decimal would be located</dd>
<dd><code>precision</code> - the number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkoverflow</code> - if true, when the designated an <code>ArithmeticException</code></dd>
<dd><code>unicodeType</code> - constant value indicating the type of Unicode Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>unicodeDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if the <code>checkOverflow</code> parameter is true and overflow occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the <code>decimalType</code> or <code>precision</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertLongToPackedDecimal-long-byte:A-int-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertLongToPackedDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertLongToPackedDecimal(long&nbsp;longValue,
byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</pre>
<div class="block">Converts a binary long value into signed Packed Decimal format. The Packed Decimal will be padded with zeros on
the left if necessary.
Overflow can happen if the resulting Packed Decimal does not fit into the result byte array, given the offset and
precision . In this case, when <code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown,
when false a truncated or invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>longValue</code> - the binary long value to convert</dd>
<dd><code>packedDecimal</code> - byte array that will store the resulting Packed Decimal value</dd>
<dd><code>offset</code> - offset of the first byte of the Packed Decimal in <code>packedDecimal</code></dd>
<dd><code>precision</code> - number of Packed Decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow), otherwise a truncated value is returned</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - the <code>checkOverflow</code> parameter is true and overflow occurs</dd>
</dl>
</li>
</ul>
<a name="convertLongToExternalDecimal-long-byte:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertLongToExternalDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertLongToExternalDecimal(long&nbsp;longValue,
byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts a long into an External Decimal in a byte array. The External Decimal will be padded with zeros on the
left if necessary.
Overflow can happen if the External Decimal value does not fit into the byte array, given its precision and offset.
In this case, when <code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a
truncated or invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>longValue</code> - the value to convert</dd>
<dd><code>externalDecimal</code> - the byte array which will hold the External Decimal on a successful return</dd>
<dd><code>offset</code> - the offset into <code>externalDecimal</code> where External Decimal should be located</dd>
<dd><code>precision</code> - the number of decimal digits to convert. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> or <code>IllegalArgumentException</code> may be thrown</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if the <code>checkOverflow</code> parameter is true and overflow occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the <code>decimalType</code> or <code>precision</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertLongToUnicodeDecimal-long-char:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertLongToUnicodeDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertLongToUnicodeDecimal(long&nbsp;longValue,
char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts a long to a Unicode Decimal in a char array
Overflow can happen if the resulting Unicode Decimal value does not fit into the char array, given its precision
and offset . In this case, when <code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown,
when false a truncated or invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>longValue</code> - the long value to convert</dd>
<dd><code>unicodeDecimal</code> - the char array which will hold the Unicode Decimal on a successful return</dd>
<dd><code>offset</code> - the offset in the char array where the Unicode Decimal would be located</dd>
<dd><code>precision</code> - the number of Unicode Decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> or <code>IllegalArgumentException</code> may be thrown</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>unicodeDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if the <code>checkOverflow</code> parameter is true and overflow occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>decimalType</code> or <code>precision</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertPackedDecimalToInteger-byte:A-int-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertPackedDecimalToInteger</h4>
<pre>public static&nbsp;int&nbsp;convertPackedDecimalToInteger(byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</pre>
<div class="block">Converts a Packed Decimal value in a byte array into a binary integer. If the digital part of the input Packed
Decimal is not valid then the digital part of the output will not be valid. The sign of the input Packed Decimal
is assumed to to be positive unless the sign nibble contains one of the negative sign codes, in which case the
sign of the input Packed Decimal is interpreted as negative.
Overflow can happen if the Packed Decimal value does not fit into a binary integer. When
<code>checkOverflow</code> is true overflow results in an <code>ArithmeticException</code>, when false a
truncated or invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>packedDecimal</code> - byte array which contains the Packed Decimal value</dd>
<dd><code>offset</code> - offset of the first byte of the Packed Decimal in <code>packedDecimal</code></dd>
<dd><code>precision</code> - number of Packed Decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> may be thrown</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>int the resulting binary integer value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result does not fit into an int (overflow)</dd>
</dl>
</li>
</ul>
<a name="convertPackedDecimalToLong-byte:A-int-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertPackedDecimalToLong</h4>
<pre>public static&nbsp;long&nbsp;convertPackedDecimalToLong(byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</pre>
<div class="block">Converts a Packed Decimal value in a byte array into a binary long. If the digital part of the input Packed
Decimal is not valid then the digital part of the output will not be valid. The sign of the input Packed Decimal
is assumed to to be positive unless the sign nibble contains one of the negative sign codes, in which case the
sign of the input Packed Decimal is interpreted as negative.
Overflow can happen if the Packed Decimal value does not fit into a binary long. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>packedDecimal</code> - byte array which contains the Packed Decimal value</dd>
<dd><code>offset</code> - offset of the first byte of the Packed Decimal in <code>packedDecimal</code></dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> may be thrown</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>long the resulting binary long value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result does not fit into a long (overflow)</dd>
</dl>
</li>
</ul>
<a name="convertPackedDecimalToExternalDecimal-byte:A-int-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertPackedDecimalToExternalDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertPackedDecimalToExternalDecimal(byte[]&nbsp;packedDecimal,
int&nbsp;packedOffset,
byte[]&nbsp;externalDecimal,
int&nbsp;externalOffset,
int&nbsp;precision,
int&nbsp;decimalType)</pre>
<div class="block">Converts a Packed Decimal in a byte array into an External Decimal in another byte array. If the digital part of
the input Packed Decimal is not valid then the digital part of the output will not be valid. The sign of the
input Packed Decimal is assumed to to be positive unless the sign nibble contains one of the negative sign codes,
in which case the sign of the input Packed Decimal is interpreted as negative.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>packedDecimal</code> - byte array that holds the Packed Decimal to be converted</dd>
<dd><code>packedOffset</code> - offset in <code>packedDecimal</code> where the Packed Decimal is located</dd>
<dd><code>externalDecimal</code> - byte array that will hold the External Decimal on a successful return</dd>
<dd><code>externalOffset</code> - offset in <code>externalOffset</code> where the External Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits</dd>
<dd><code>decimalType</code> - constant indicating the type of the decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> or <code>externalDecimal</code> are null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>precision</code> or <code>decimalType</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertPackedDecimalToUnicodeDecimal-byte:A-int-char:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertPackedDecimalToUnicodeDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertPackedDecimalToUnicodeDecimal(byte[]&nbsp;packedDecimal,
int&nbsp;packedOffset,
char[]&nbsp;unicodeDecimal,
int&nbsp;unicodeOffset,
int&nbsp;precision,
int&nbsp;decimalType)</pre>
<div class="block">Convert a Packed Decimal in a byte array to a Unicode Decimal in a char array. If the digital part of the input
Packed Decimal is not valid then the digital part of the output will not be valid. The sign of the input Packed
Decimal is assumed to to be positive unless the sign nibble contains one of the negative sign codes, in which
case the sign of the input Packed Decimal is interpreted as negative.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>packedDecimal</code> - byte array that holds a Packed Decimal to be converted</dd>
<dd><code>packedOffset</code> - offset in <code>packedDecimal</code> where the Packed Decimal is located</dd>
<dd><code>unicodeDecimal</code> - char array that will hold the Unicode Decimal on a successful return</dd>
<dd><code>unicodeOffset</code> - offset in the byte array where the Unicode Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits</dd>
<dd><code>decimalType</code> - constant value indicating the type of the External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> or <code>unicodeDecimal</code> are null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>precision</code> or <code>decimalType</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertPackedDecimalToBigInteger-byte:A-int-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertPackedDecimalToBigInteger</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;convertPackedDecimalToBigInteger(byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</pre>
<div class="block">Convert a Packed Decimal in a byte array to a BigInteger. If the digital part of the input Packed Decimal is not
valid then the digital part of the output will not be valid. The sign of the input Packed Decimal is assumed to
to be positive unless the sign nibble contains one of the negative sign codes, in which case the sign of the
input Packed Decimal is interpreted as negative.
Overflow can happen if the Packed Decimal value does not fit into the BigInteger. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>packedDecimal</code> - byte array that holds the Packed Decimal to be converted</dd>
<dd><code>offset</code> - offset in <code>packedDecimal</code> where the Packed Decimal is located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BigInteger the resulting BigInteger</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> is null</dd>
</dl>
</li>
</ul>
<a name="convertPackedDecimalToBigDecimal-byte:A-int-int-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertPackedDecimalToBigDecimal</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;convertPackedDecimalToBigDecimal(byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
int&nbsp;scale,
boolean&nbsp;checkOverflow)</pre>
<div class="block">Convert a Packed Decimal in a byte array to a BigDecimal. If the digital part of the input Packed Decimal is not
valid then the digital part of the output will not be valid. The sign of the input Packed Decimal is assumed to
to be positive unless the sign nibble contains one of the negative sign codes, in which case the sign of the
input Packed Decimal is interpreted as negative.
Overflow can happen if the Packed Decimal value does not fit into the BigDecimal. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>packedDecimal</code> - byte array that holds the Packed Decimal to be converted</dd>
<dd><code>offset</code> - offset in <code>packedDecimal</code> where the Packed Decimal is located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>scale</code> - scale of the BigDecimal to be returned</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BigDecimal the resulting BigDecimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - /requires rounding if an invalid array access occurs</dd>
</dl>
</li>
</ul>
<a name="convertExternalDecimalToInteger-byte:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertExternalDecimalToInteger</h4>
<pre>public static&nbsp;int&nbsp;convertExternalDecimalToInteger(byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts an External Decimal value in a byte array into a binary integer. If the digital part of the input
External Decimal is not valid then the digital part of the output will not be valid. The sign of the input
External Decimal is assumed to to be positive unless the sign nibble or byte (depending on
<code>decimalType</code>) contains one of the negative sign codes, in which case the sign of the input External
Decimal is interpreted as negative.
Overflow can happen if the External Decimal value does not fit into a binary integer. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false the resulting number
will be wrapped around starting at the minimum/maximum possible integer value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>externalDecimal</code> - byte array which contains the External Decimal value</dd>
<dd><code>offset</code> - the offset where the External Decimal value is located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> or <code>IllegalArgumentException</code> may be thrown. If
false and there is an overflow, the result is undefined.</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>int the resulting binary integer</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result does not fit into a int (overflow)</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>precision</code> or <code>decimalType</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertExternalDecimalToLong-byte:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertExternalDecimalToLong</h4>
<pre>public static&nbsp;long&nbsp;convertExternalDecimalToLong(byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts an External Decimal value in a byte array into a long. If the digital part of the input External Decimal
is not valid then the digital part of the output will not be valid. The sign of the input External Decimal is
assumed to to be positive unless the sign nibble or byte (depending on <code>decimalType</code>) contains one of
the negative sign codes, in which case the sign of the input External Decimal is interpreted as negative.
Overflow can happen if the External Decimal value does not fit into a binary long. When
<code>checkOverflow</code> is true overflow results in an <code>ArithmeticException</code>, when false the
resulting number will be wrapped around starting at the minimum/maximum possible long value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>externalDecimal</code> - byte array which contains the External Decimal value</dd>
<dd><code>offset</code> - offset of the first byte of the Packed Decimal in the <code>externalDecimal</code></dd>
<dd><code>precision</code> - number of External Decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown when the converted value cannot fit into
designated External Decimal array. If false and there is an overflow, the result is undefined.</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>long the resulting binary long value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result does not fit into a long (overflow)</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>precision</code> or <code>decimalType</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertExternalDecimalToPackedDecimal-byte:A-int-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertExternalDecimalToPackedDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertExternalDecimalToPackedDecimal(byte[]&nbsp;externalDecimal,
int&nbsp;externalOffset,
byte[]&nbsp;packedDecimal,
int&nbsp;packedOffset,
int&nbsp;precision,
int&nbsp;decimalType)</pre>
<div class="block">Converts an External Decimal in a byte array to a Packed Decimal in another byte array. If the digital part of
the input External Decimal is not valid then the digital part of the output will not be valid. The sign of the
input External Decimal is assumed to to be positive unless the sign nibble or byte (depending on
<code>decimalType</code>) contains one of the negative sign codes, in which case the sign of the input External
Decimal is interpreted as negative.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>externalDecimal</code> - byte array holding the External Decimal to be converted</dd>
<dd><code>externalOffset</code> - offset in <code>externalDecimal</code> where the External Decimal is located</dd>
<dd><code>packedDecimal</code> - byte array which will hold the Packed Decimal on a successful return</dd>
<dd><code>packedOffset</code> - offset in <code>packedDecimal</code> where the Packed Decimal is expected to be located</dd>
<dd><code>precision</code> - the number of decimal digits</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> or <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>precision</code> or <code>decimalType</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertExternalDecimalToBigInteger-byte:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertExternalDecimalToBigInteger</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;convertExternalDecimalToBigInteger(byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Convert an External Decimal in a byte array to a BigInteger. The sign of the input External Decimal is assumed to
to be positive unless the sign nibble or byte (depending on <code>decimalType</code>) contains one of the
negative sign codes, in which case the sign of the input External Decimal is interpreted as negative.
Overflow can happen if the External Decimal value does not fit into the BigInteger. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>externalDecimal</code> - byte array that holds the Packed Decimal to be converted</dd>
<dd><code>offset</code> - offset in <code>externalDecimal</code> where the Packed Decimal is located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BigInteger the resulting BigInteger</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>decimalType</code> or <code>precision</code> is invalid, or the digital part of the input is
invalid.</dd>
</dl>
</li>
</ul>
<a name="convertExternalDecimalToBigDecimal-byte:A-int-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertExternalDecimalToBigDecimal</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;convertExternalDecimalToBigDecimal(byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
int&nbsp;scale,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts an External Decimal in a byte array to a BigDecimal. The sign of the input External Decimal is assumed
to to be positive unless the sign nibble or byte (depending on <code>decimalType</code>) contains one of the
negative sign codes, in which case the sign of the input External Decimal is interpreted as negative.
Overflow can happen if the External Decimal value does not fit into the BigDecimal. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>externalDecimal</code> - byte array holding the External Decimal to be converted</dd>
<dd><code>offset</code> - offset in <code>externalDecimal</code> where the External Decimal is located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>scale</code> - scale of the BigDecimal</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dd><code>decimalType</code> - constant value that indicates the type of External Decimal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BigDecimal the resulting BigDecimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>checkOverflow</code> is true and the Packed Decimal is in an invalid format, or the digital
part of the input is invalid.</dd>
</dl>
</li>
</ul>
<a name="convertUnicodeDecimalToInteger-char:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertUnicodeDecimalToInteger</h4>
<pre>public static&nbsp;int&nbsp;convertUnicodeDecimalToInteger(char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;unicodeType)</pre>
<div class="block">Converts a Unicode Decimal value in a char array into a binary integer. The sign of the input Unicode Decimal is
assumed to to be positive unless the sign char contains the negative sign code, in which case the sign of the
input Unicode Decimal is interpreted as negative.
Overflow can happen if the Unicode Decimal value does not fit into a binary int. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>unicodeDecimal</code> - char array which contains the Unicode Decimal value</dd>
<dd><code>offset</code> - the offset where the Unicode Decimal value is located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> or <code>IllegalArgumentException</code> may be thrown</dd>
<dd><code>unicodeType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>int the resulting binary integer</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>unicodeDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result does not fit into a long (overflow)</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>precision</code> or <code>decimalType</code> is invalid, or the digital part of the input is
invalid.</dd>
</dl>
</li>
</ul>
<a name="convertUnicodeDecimalToLong-char:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertUnicodeDecimalToLong</h4>
<pre>public static&nbsp;long&nbsp;convertUnicodeDecimalToLong(char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;unicodeType)</pre>
<div class="block">Converts a Unicode Decimal value in a char array into a binary long. The sign of the input Unicode Decimal is
assumed to to be positive unless the sign char contains the negative sign code, in which case the sign of the
input Unicode Decimal is interpreted as negative.
Overflow can happen if the Unicode Decimal value does not fit into a binary long. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>unicodeDecimal</code> - char array which contains the External Decimal value</dd>
<dd><code>offset</code> - offset of the first byte of the Unicode Decimal in <code>unicodeDecimal</code></dd>
<dd><code>precision</code> - number of Unicode Decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown when</dd>
<dd><code>unicodeType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>long the resulting binary long value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>unicodeDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result does not fit into a long (overflow)</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>unicodeType</code> or <code>precision</code> is invalid, or the digital part of the input is
invalid.</dd>
</dl>
</li>
</ul>
<a name="convertUnicodeDecimalToPackedDecimal-char:A-int-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertUnicodeDecimalToPackedDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertUnicodeDecimalToPackedDecimal(char[]&nbsp;unicodeDecimal,
int&nbsp;unicodeOffset,
byte[]&nbsp;packedDecimal,
int&nbsp;packedOffset,
int&nbsp;precision,
int&nbsp;decimalType)</pre>
<div class="block">Converts an Unicode Decimal in a char array to a Packed Decimal in a byte array. If the digital part of the input
Unicode Decimal is not valid then the digital part of the output will not be valid. The sign of the input Unicode
Decimal is assumed to to be positive unless the sign byte contains the negative sign code, in which case the sign
of the input Unicode Decimal is interpreted as negative.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>unicodeDecimal</code> - char array that holds the Unicode Decimal to be converted</dd>
<dd><code>unicodeOffset</code> - offset in <code>unicodeDecimal</code> at which the Unicode Decimal is located</dd>
<dd><code>packedDecimal</code> - byte array that will hold the Packed Decimal on a successful return</dd>
<dd><code>packedOffset</code> - offset in <code>packedDecimal</code> where the Packed Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> or <code>unicodeDecimal</code> are null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>precision</code> or <code>decimalType</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertUnicodeDecimalToBigInteger-char:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertUnicodeDecimalToBigInteger</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;convertUnicodeDecimalToBigInteger(char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Convert a Unicode Decimal in a char array to a BigInteger. The sign of the input Unicode Decimal is assumed to to
be positive unless the sign byte contains the negative sign code, in which case the sign of the input Unicode
Decimal is interpreted as negative.
Overflow can happen if the Unicode Decimal value does not fit into a binary long. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>unicodeDecimal</code> - char array that holds the Packed Decimal to be converted</dd>
<dd><code>offset</code> - offset into <code>unicodeDecimal</code> where the Packed Decimal is located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BigInteger the resulting BigInteger</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>unicodeDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>decimalType</code> or <code>precision</code> is invalid, or the digital part of the input is
invalid.</dd>
</dl>
</li>
</ul>
<a name="convertUnicodeDecimalToBigDecimal-char:A-int-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertUnicodeDecimalToBigDecimal</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;convertUnicodeDecimalToBigDecimal(char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
int&nbsp;scale,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts a Unicode Decimal in a char array to a BigDecimal. The sign of the input Unicode Decimal is assumed to
to be positive unless the sign byte contains the negative sign code, in which case the sign of the input Unicode
Decimal is interpreted as negative.
Overflow can happen if the Unicode Decimal value does not fit into the BigDecimal. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>unicodeDecimal</code> - char array that holds the Unicode Decimal</dd>
<dd><code>offset</code> - offset in <code>unicodeDecimal</code> where the Unicode Decimal is located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>scale</code> - scale of the returned BigDecimal</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dd><code>decimalType</code> - constant value indicating the type of External Decimal</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BigDecimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>unicodeDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>checkOverflow</code> is true and the Packed Decimal is in an invalid format, or the digital
part of the input is invalid.</dd>
</dl>
</li>
</ul>
<a name="convertBigIntegerToPackedDecimal-java.math.BigInteger-byte:A-int-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertBigIntegerToPackedDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertBigIntegerToPackedDecimal(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;bigIntegerValue,
byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</pre>
<div class="block">Converts a BigInteger value into a Packed Decimal in a byte array
Overflow can happen if the BigInteger does not fit into the byte array. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bigIntegerValue</code> - BigInteger value to be converted</dd>
<dd><code>packedDecimal</code> - byte array which will hold the Packed Decimal on a successful return</dd>
<dd><code>offset</code> - offset into <code>packedDecimal</code> where the Packed Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253s</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
</dl>
</li>
</ul>
<a name="convertBigIntegerToExternalDecimal-java.math.BigInteger-byte:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertBigIntegerToExternalDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertBigIntegerToExternalDecimal(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;bigIntegerValue,
byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts a BigInteger value into an External Decimal in a byte array
Overflow can happen if the BigInteger does not fit into the byte array. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bigIntegerValue</code> - BigInteger value to be converted</dd>
<dd><code>externalDecimal</code> - byte array which will hold the External Decimal on a successful return</dd>
<dd><code>offset</code> - offset into <code>externalDecimal</code> where the External Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dd><code>decimalType</code> - constant value that indicates the type of External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>decimalType</code> or <code>precision</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertBigIntegerToUnicodeDecimal-java.math.BigInteger-char:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertBigIntegerToUnicodeDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertBigIntegerToUnicodeDecimal(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math">BigInteger</a>&nbsp;bigIntegerValue,
char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts a BigInteger value to a Unicode Decimal in a char array
Overflow can happen if the BigInteger does not fit into the char array. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bigIntegerValue</code> - BigInteger value to be converted</dd>
<dd><code>unicodeDecimal</code> - char array that will hold the Unicode decimal on a successful return</dd>
<dd><code>offset</code> - offset into <code>unicodeDecimal</code> where the Unicode Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dd><code>decimalType</code> - constant indicating the type of External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>unicodeDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>decimalType</code> or <code>precision</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertBigDecimalToPackedDecimal-java.math.BigDecimal-byte:A-int-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertBigDecimalToPackedDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertBigDecimalToPackedDecimal(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;bigDecimalValue,
byte[]&nbsp;packedDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow)</pre>
<div class="block">Converts a BigDecimal into a Packed Decimal in a byte array
Overflow can happen if the BigDecimal does not fit into the result byte array. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bigDecimalValue</code> - the BigDecimal value to be converted</dd>
<dd><code>packedDecimal</code> - byte array which will hold the Packed Decimal on a successful return</dd>
<dd><code>offset</code> - desired offset in <code>packedDecimal</code> where the Packed Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>packedDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
</dl>
</li>
</ul>
<a name="convertBigDecimalToExternalDecimal-java.math.BigDecimal-byte:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertBigDecimalToExternalDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertBigDecimalToExternalDecimal(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;bigDecimalValue,
byte[]&nbsp;externalDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts a BigDecimal value to an External Decimal in a byte array
Overflow can happen if the BigDecimal does not fit into the result byte array. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bigDecimalValue</code> - BigDecimal value to be converted</dd>
<dd><code>externalDecimal</code> - byte array that will hold the External Decimal on a successful return</dd>
<dd><code>offset</code> - offset in <code>externalDecimal</code> where the External Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dd><code>decimalType</code> - constant value indicating the External Decimal type</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>externalDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>precision</code> or <code>decimalType</code> is invalid</dd>
</dl>
</li>
</ul>
<a name="convertBigDecimalToUnicodeDecimal-java.math.BigDecimal-char:A-int-int-boolean-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>convertBigDecimalToUnicodeDecimal</h4>
<pre>public static&nbsp;void&nbsp;convertBigDecimalToUnicodeDecimal(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" target="_blank" title="class or interface in java.math">BigDecimal</a>&nbsp;bigDecimalValue,
char[]&nbsp;unicodeDecimal,
int&nbsp;offset,
int&nbsp;precision,
boolean&nbsp;checkOverflow,
int&nbsp;decimalType)</pre>
<div class="block">Converts a BigDecimal value to a Unicode Decimal in a char array
Overflow can happen if the BigDecimal does not fit into the result char array. In this case, when
<code>checkOverflow</code> is true an <code>ArithmeticException</code> is thrown, when false a truncated or
invalid result is returned.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bigDecimalValue</code> - BigDecimal value to be converted</dd>
<dd><code>unicodeDecimal</code> - char array which will hold the Unicode Decimal on a successful return</dd>
<dd><code>offset</code> - offset in <code>unicodeDecimal</code> where the Unicode Decimal is expected to be located</dd>
<dd><code>precision</code> - number of decimal digits. Maximum valid precision is 253</dd>
<dd><code>checkOverflow</code> - if true an <code>ArithmeticException</code> will be thrown if the decimal value does not fit in the
specified precision (overflow)</dd>
<dd><code>decimalType</code> - constant value that indicates the type of External Decimal</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" target="_blank" title="class or interface in java.lang">NullPointerException</a></code> - if <code>unicodeDecimal</code> is null</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html?is-external=true" target="_blank" title="class or interface in java.lang">ArithmeticException</a></code> - if <code>checkOverflow</code> is true and the result overflows</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" target="_blank" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>decimalType</code> or <code>precision</code> is invalid</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../com/ibm/dataaccess/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DecimalData.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 class="aboutLanguage"><strong>OpenJ9 Data Access Acceleration Classes</strong></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/ibm/dataaccess/ByteArrayUnmarshaller.html" title="class in com.ibm.dataaccess"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/ibm/dataaccess/PackedDecimal.html" title="class in com.ibm.dataaccess"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/ibm/dataaccess/DecimalData.html" target="_top">Frames</a></li>
<li><a href="DecimalData.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><a href="https://www.eclipse.org/openj9/" target="_blank">Eclipse OpenJ9 website.</a><br> To raise a bug report or suggest an improvement create an <a href="https://github.com/eclipse/openj9/issues" target="_blank">Eclipse OpenJ9 issue.</a><br> Copyright &copy; 2013, 2020, IBM Corp. and others.</small></p>
</body>
</html>