| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>PackedDecimal (OpenJ9 JDK 11)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="keywords" content="com.ibm.dataaccess.PackedDecimal class"> |
| <meta name="keywords" content="checkPackedDecimal()"> |
| <meta name="keywords" content="addPackedDecimal()"> |
| <meta name="keywords" content="subtractPackedDecimal()"> |
| <meta name="keywords" content="setPackedZero()"> |
| <meta name="keywords" content="multiplyPackedDecimal()"> |
| <meta name="keywords" content="dividePackedDecimal()"> |
| <meta name="keywords" content="remainderPackedDecimal()"> |
| <meta name="keywords" content="lessThanPackedDecimal()"> |
| <meta name="keywords" content="lessThanOrEqualsPackedDecimal()"> |
| <meta name="keywords" content="greaterThanPackedDecimal()"> |
| <meta name="keywords" content="greaterThanOrEqualsPackedDecimal()"> |
| <meta name="keywords" content="equalsPackedDecimal()"> |
| <meta name="keywords" content="notEqualsPackedDecimal()"> |
| <meta name="keywords" content="shiftRightPackedDecimal()"> |
| <meta name="keywords" content="shiftLeftPackedDecimal()"> |
| <meta name="keywords" content="movePackedDecimal()"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="PackedDecimal (OpenJ9 JDK 11)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"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}; |
| 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"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/PackedDecimal.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-files/index-1.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><div style="margin-top: 9px;"><strong>OpenJ9 JDK 11</strong></div></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="moduleLabelInType">Module</span> <a href="../../../module-summary.html">openj9.dataaccess</a></div> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.ibm.dataaccess</a></div> |
| <h2 title="Class PackedDecimal" class="title">Class PackedDecimal</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>com.ibm.dataaccess.PackedDecimal</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public final class <span class="typeNameLabel">PackedDecimal</span> |
| extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">Object</a></pre> |
| <div class="block">Arithmetic, copying and shifting operations for Packed Decimal data.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int,byte%5B%5D,int,int,boolean)">addPackedDecimal</a></span>​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow)</code></th> |
| <td class="colLast"> |
| <div class="block">Add two Packed Decimals in byte arrays.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkPackedDecimal(byte%5B%5D,int,int)">checkPackedDecimal</a></span>​(byte[] byteArray, |
| int offset, |
| int precision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks the validity of a Packed Decimal, return code indicating the status of the Packed Decimal.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkPackedDecimal(byte%5B%5D,int,int,boolean)">checkPackedDecimal</a></span>​(byte[] byteArray, |
| int offset, |
| int precision, |
| boolean ignoreHighNibbleForEvenPrecision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks the validity of a Packed Decimal, return code indicating the status of the Packed Decimal.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkPackedDecimal(byte%5B%5D,int,int,boolean,boolean)">checkPackedDecimal</a></span>​(byte[] byteArray, |
| int offset, |
| int precision, |
| boolean ignoreHighNibbleForEvenPrecision, |
| boolean canOverwriteHighNibbleForEvenPrecision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks the validity of a Packed Decimal, return code indicating the status of the Packed Decimal.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dividePackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int,byte%5B%5D,int,int,boolean)">dividePackedDecimal</a></span>​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow)</code></th> |
| <td class="colLast"> |
| <div class="block">Divides two Packed Decimals is byte arrays.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equalsPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int)">equalsPackedDecimal</a></span>​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks if the two Packed Decimal operands are equal.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#greaterThanOrEqualsPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int)">greaterThanOrEqualsPackedDecimal</a></span>​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks if the first Packed Decimal operand is greater than or equal to the second one.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#greaterThanPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int)">greaterThanPackedDecimal</a></span>​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks if the first Packed Decimal operand is greater than the second one.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lessThanOrEqualsPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int)">lessThanOrEqualsPackedDecimal</a></span>​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks if the first Packed Decimal operand is less than or equal to the second one.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lessThanPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int)">lessThanPackedDecimal</a></span>​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks if the first Packed Decimal operand is lesser than the second one.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#movePackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int,boolean)">movePackedDecimal</a></span>​(byte[] destination, |
| int destinationOffset, |
| int destinationPrecision, |
| byte[] source, |
| int sourceOffset, |
| int sourcePrecision, |
| boolean checkOverflow)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a copy of a Packed Decimal.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#multiplyPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int,byte%5B%5D,int,int,boolean)">multiplyPackedDecimal</a></span>​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow)</code></th> |
| <td class="colLast"> |
| <div class="block">Multiplies two Packed Decimals in byte arrays.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#notEqualsPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int)">notEqualsPackedDecimal</a></span>​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks if the two Packed Decimal operands are unequal.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remainderPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int,byte%5B%5D,int,int,boolean)">remainderPackedDecimal</a></span>​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow)</code></th> |
| <td class="colLast"> |
| <div class="block">Calculates the remainder resulting from the division of two Packed Decimals in byte arrays.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPackedZero(byte%5B%5D,int,int)">setPackedZero</a></span>​(byte[] byteArray, |
| int offset, |
| int len)</code></th> |
| <td class="colLast"> |
| <div class="block">Create a positive Packed Decimal representation of zero.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shiftLeftPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int,int,boolean)">shiftLeftPackedDecimal</a></span>​(byte[] destination, |
| int destinationOffset, |
| int destinationPrecision, |
| byte[] source, |
| int sourceOffset, |
| int sourcePrecision, |
| int shiftAmount, |
| boolean checkOverflow)</code></th> |
| <td class="colLast"> |
| <div class="block">Left shift a Packed Decimal appending zeros to the right.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shiftRightPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int,int,boolean,boolean)">shiftRightPackedDecimal</a></span>​(byte[] destination, |
| int destinationOffset, |
| int destinationPrecision, |
| byte[] source, |
| int sourceOffset, |
| int sourcePrecision, |
| int shiftAmount, |
| boolean round, |
| boolean checkOverflow)</code></th> |
| <td class="colLast"> |
| <div class="block">Right shift, and optionally round, a Packed Decimal.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subtractPackedDecimal(byte%5B%5D,int,int,byte%5B%5D,int,int,byte%5B%5D,int,int,boolean)">subtractPackedDecimal</a></span>​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow)</code></th> |
| <td class="colLast"> |
| <div class="block">Subtracts two Packed Decimals in byte arrays.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods declared in class java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink" target="_blank">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_blank">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink" target="_blank">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink" target="_blank">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink" target="_blank">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink" target="_blank">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink" target="_blank">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink" target="_blank">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink" target="_blank">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink" target="_blank">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_blank">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="checkPackedDecimal(byte[],int,int,boolean,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkPackedDecimal</h4> |
| <pre class="methodSignature">public static int checkPackedDecimal​(byte[] byteArray, |
| int offset, |
| int precision, |
| boolean ignoreHighNibbleForEvenPrecision, |
| boolean canOverwriteHighNibbleForEvenPrecision)</pre> |
| <div class="block">Checks the validity of a Packed Decimal, return code indicating the status of the Packed Decimal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>byteArray</code> - the source container array</dd> |
| <dd><code>offset</code> - starting offset of the Packed Decimal</dd> |
| <dd><code>precision</code> - precision of the Packed Decimal. Maximum valid precision is 253</dd> |
| <dd><code>ignoreHighNibbleForEvenPrecision</code> - if true, ignore to check if the top nibble (first 4 bits) of the input is an invalid sign value in the |
| case of even precision</dd> |
| <dd><code>canOverwriteHighNibbleForEvenPrecision</code> - if true, change the high nibble to a zero in case of even precision</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the condition code: 0 All digit codes and the sign valid 1 Sign invalid 2 At least one digit code invalid |
| 3 Sign invalid and at least one digit code invalid</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if <code>byteArray</code> is null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="checkPackedDecimal(byte[],int,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkPackedDecimal</h4> |
| <pre class="methodSignature">public static int checkPackedDecimal​(byte[] byteArray, |
| int offset, |
| int precision, |
| boolean ignoreHighNibbleForEvenPrecision)</pre> |
| <div class="block">Checks the validity of a Packed Decimal, return code indicating the status of the Packed Decimal. The most |
| significant nibble cannot be overwritten.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>byteArray</code> - the source container array</dd> |
| <dd><code>offset</code> - starting offset of the Packed Decimal</dd> |
| <dd><code>precision</code> - precision of the Packed Decimal</dd> |
| <dd><code>ignoreHighNibbleForEvenPrecision</code> - if true, ignore the high nibble in the case of even precision</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the condition code: 0 All digit codes and the sign valid 1 Sign invalid 2 At least one digit code invalid |
| 3 Sign invalid and at least one digit code invalid</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if <code>byteArray</code> is null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="checkPackedDecimal(byte[],int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkPackedDecimal</h4> |
| <pre class="methodSignature">public static int checkPackedDecimal​(byte[] byteArray, |
| int offset, |
| int precision)</pre> |
| <div class="block">Checks the validity of a Packed Decimal, return code indicating the status of the Packed Decimal. Don't ignore |
| the most significant nibble. The most significant nibble cannot be overwritten.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>byteArray</code> - the source container array</dd> |
| <dd><code>offset</code> - starting offset of the Packed Decimal</dd> |
| <dd><code>precision</code> - precision of the Packed Decimal</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the condition code: 0 All digit codes and the sign valid 1 Sign invalid 2 At least one digit code invalid |
| 3 Sign invalid and at least one digit code invalid</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if <code>byteArray</code> is null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addPackedDecimal(byte[],int,int,byte[],int,int,byte[],int,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addPackedDecimal</h4> |
| <pre class="methodSignature">public static void addPackedDecimal​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow) |
| throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></pre> |
| <div class="block">Add two Packed Decimals in byte arrays. The sign of an input Packed Decimal is assumed to be positive unless |
| the sign nibble contains one of the negative sign codes, in which case the sign of the respective input Packed |
| Decimal is interpreted as negative.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>result</code> - byte array that will hold the sum of the two operand Packed Decimals</dd> |
| <dd><code>resultOffset</code> - offset into <code>result</code> where the sum Packed Decimal begins</dd> |
| <dd><code>resultPrecision</code> - number of Packed Decimal digits for the sum. Maximum valid precision is 253</dd> |
| <dd><code>op1Decimal</code> - byte array that holds the first operand Packed Decimal.</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the Packed Decimal. is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the first operand. Maximum valid precision is 253</dd> |
| <dd><code>op2Decimal</code> - byte array that holds the second operand Packed Decimal</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the Packed Decimal is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the second operand. Maximum valid precision is 253</dd> |
| <dd><code>checkOverflow</code> - check for overflow</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></code> - if an overflow occurs during the computation of the sum</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="subtractPackedDecimal(byte[],int,int,byte[],int,int,byte[],int,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>subtractPackedDecimal</h4> |
| <pre class="methodSignature">public static void subtractPackedDecimal​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow) |
| throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></pre> |
| <div class="block">Subtracts two Packed Decimals in byte arrays. The sign of an input Packed Decimal is assumed to be positive |
| unless the sign nibble contains one of the negative sign codes, in which case the sign of the respective input |
| Packed Decimal is interpreted as negative.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>result</code> - byte array that will hold the difference of the two operand Packed Decimals</dd> |
| <dd><code>resultOffset</code> - offset into <code>result</code> where the result Packed Decimal is located</dd> |
| <dd><code>resultPrecision</code> - number of Packed Decimal digits for the result. Maximum valid precision is 253</dd> |
| <dd><code>op1Decimal</code> - byte array that holds the first Packed Decimal operand</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the first operand is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the first operand. Maximum valid precision is 253</dd> |
| <dd><code>op2Decimal</code> - byte array that holds the second Packed Decimal operand</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the second operand is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the second operand. Maximum valid precision is 253</dd> |
| <dd><code>checkOverflow</code> - check for overflow</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></code> - if an overflow occurs during the computation of the difference</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setPackedZero(byte[],int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPackedZero</h4> |
| <pre class="methodSignature">public static void setPackedZero​(byte[] byteArray, |
| int offset, |
| int len)</pre> |
| <div class="block">Create a positive Packed Decimal representation of zero.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>byteArray</code> - byte array which will hold the packed zero</dd> |
| <dd><code>offset</code> - offset into <code>toBytes</code> where the packed zero begins</dd> |
| <dd><code>len</code> - length of the packed zero. Maximum valid length is 253</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if <code>toBytes</code> is null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="multiplyPackedDecimal(byte[],int,int,byte[],int,int,byte[],int,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>multiplyPackedDecimal</h4> |
| <pre class="methodSignature">public static void multiplyPackedDecimal​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow)</pre> |
| <div class="block">Multiplies two Packed Decimals in byte arrays. The sign of an input Packed Decimal is assumed to be positive |
| unless the sign nibble contains one of the negative sign codes, in which case the sign of the respective input |
| Packed Decimal is interpreted as negative.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>result</code> - byte array that will hold the product Packed Decimal</dd> |
| <dd><code>resultOffset</code> - offset into <code>result</code> where the product Packed Decimal is located</dd> |
| <dd><code>resultPrecision</code> - the length (number of digits) of the product Packed Decimal. Maximum valid precision is 253</dd> |
| <dd><code>op1Decimal</code> - byte array that will hold the multiplicand Packed Decimal</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the multiplicand is located</dd> |
| <dd><code>op1Precision</code> - the length (number of digits) of the multiplicand Packed Decimal. Maximum valid precision is 253</dd> |
| <dd><code>op2Decimal</code> - byte array that will hold the multiplier</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the multiplier is located</dd> |
| <dd><code>op2Precision</code> - the length (number of digits) of the multiplier Packed Decimal. Maximum valid precision is 253</dd> |
| <dd><code>checkOverflow</code> - if set to true, Packed Decimals are validated before multiplication and an |
| <code>IllegalArgumentException</code> or <code>ArithmeticException</code> may be thrown. If not, the |
| result can be invalid</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">IllegalArgumentException</a></code> - if an overflow occurs during multiplication</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></code> - if any of the Packed Decimal operands are invalid</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="dividePackedDecimal(byte[],int,int,byte[],int,int,byte[],int,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dividePackedDecimal</h4> |
| <pre class="methodSignature">public static void dividePackedDecimal​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow)</pre> |
| <div class="block">Divides two Packed Decimals is byte arrays. The sign of an input Packed Decimal is assumed to be positive |
| unless the sign nibble contains one of the negative sign codes, in which case the sign of the respective input |
| Packed Decimal is interpreted as negative.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>result</code> - byte array that will hold the quotient Packed Decimal</dd> |
| <dd><code>resultOffset</code> - offset into <code>result</code> where the quotient Packed Decimal is located</dd> |
| <dd><code>resultPrecision</code> - the length (number of digits) of the quotient Packed Decimal. Maximum valid precision is 253</dd> |
| <dd><code>op1Decimal</code> - byte array that will hold the dividend Packed Decimal</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the dividend is located</dd> |
| <dd><code>op1Precision</code> - the length (number of digits) of the dividend Packed Decimal. Maximum valid precision is 253</dd> |
| <dd><code>op2Decimal</code> - byte array that will hold the divisor</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the divisor is located</dd> |
| <dd><code>op2Precision</code> - the length (number of digits) of the divisor Packed Decimal. Maximum valid precision is 253</dd> |
| <dd><code>checkOverflow</code> - if set to true, Packed Decimals are validated before division and an |
| <code>IllegalArgumentException</code> or <code>ArithmeticException</code> may be thrown. If not, the |
| result can be invalid</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">IllegalArgumentException</a></code> - if an overflow occurs during division</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></code> - if any of the Packed Decimal operands are invalid</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="remainderPackedDecimal(byte[],int,int,byte[],int,int,byte[],int,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>remainderPackedDecimal</h4> |
| <pre class="methodSignature">public static void remainderPackedDecimal​(byte[] result, |
| int resultOffset, |
| int resultPrecision, |
| byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision, |
| boolean checkOverflow)</pre> |
| <div class="block">Calculates the remainder resulting from the division of two Packed Decimals in byte arrays. The sign of an input |
| Packed Decimal is assumed to be positive unless the sign nibble contains one of the negative sign codes, in |
| which case the sign of the respective input Packed Decimal is interpreted as negative.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>result</code> - byte array that will hold the remainder Packed Decimal</dd> |
| <dd><code>resultOffset</code> - offset into <code>result</code> where the remainder Packed Decimal is located</dd> |
| <dd><code>resultPrecision</code> - number of Packed Decimal digits for the remainder. Maximum valid precision is 253</dd> |
| <dd><code>op1Decimal</code> - byte array that will hold the dividend Packed Decimal</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the dividend is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the dividend. Maximum valid precision is 253</dd> |
| <dd><code>op2Decimal</code> - byte array that will hold the divisor</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the divisor is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the divisor. Maximum valid precision is 253</dd> |
| <dd><code>checkOverflow</code> - if set to true, Packed Decimals are validated before division and an |
| <code>IllegalArgumentException</code> or <code>ArithmeticException</code> may be thrown. If not, the |
| result can be invalid</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">IllegalArgumentException</a></code> - if an overflow occurs during division</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></code> - if any of the Packed Decimal operands are invalid</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="lessThanPackedDecimal(byte[],int,int,byte[],int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lessThanPackedDecimal</h4> |
| <pre class="methodSignature">public static boolean lessThanPackedDecimal​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</pre> |
| <div class="block">Checks if the first Packed Decimal operand is lesser than the second one.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>op1Decimal</code> - byte array that holds the first Packed Decimal operand</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the first operand is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the first operand</dd> |
| <dd><code>op2Decimal</code> - byte array that holds the second Packed Decimal operand</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the second operand is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the second operand</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if <code>op1Decimal < op2Decimal</code>, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="lessThanOrEqualsPackedDecimal(byte[],int,int,byte[],int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lessThanOrEqualsPackedDecimal</h4> |
| <pre class="methodSignature">public static boolean lessThanOrEqualsPackedDecimal​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</pre> |
| <div class="block">Checks if the first Packed Decimal operand is less than or equal to the second one.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>op1Decimal</code> - byte array that holds the first Packed Decimal operand</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the first operand is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the first operand</dd> |
| <dd><code>op2Decimal</code> - byte array that holds the second Packed Decimal operand</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the second operand is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the second operand</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if <code>op1Decimal <= op2Decimal</code>, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="greaterThanPackedDecimal(byte[],int,int,byte[],int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>greaterThanPackedDecimal</h4> |
| <pre class="methodSignature">public static boolean greaterThanPackedDecimal​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</pre> |
| <div class="block">Checks if the first Packed Decimal operand is greater than the second one.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>op1Decimal</code> - byte array that holds the first Packed Decimal operand</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the first operand is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the first operand</dd> |
| <dd><code>op2Decimal</code> - byte array that holds the second Packed Decimal operand</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the second operand is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the second operand</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if <code>op1Decimal > op2Decimal</code>, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="greaterThanOrEqualsPackedDecimal(byte[],int,int,byte[],int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>greaterThanOrEqualsPackedDecimal</h4> |
| <pre class="methodSignature">public static boolean greaterThanOrEqualsPackedDecimal​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</pre> |
| <div class="block">Checks if the first Packed Decimal operand is greater than or equal to the second one.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>op1Decimal</code> - byte array that holds the first Packed Decimal operand</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the first operand is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the first operand</dd> |
| <dd><code>op2Decimal</code> - byte array that holds the second Packed Decimal operand</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the second operand is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the second operand</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if <code>op1Decimal >= op2Decimal</code>, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="equalsPackedDecimal(byte[],int,int,byte[],int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equalsPackedDecimal</h4> |
| <pre class="methodSignature">public static boolean equalsPackedDecimal​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</pre> |
| <div class="block">Checks if the two Packed Decimal operands are equal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>op1Decimal</code> - byte array that holds the first Packed Decimal operand</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the first operand is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the first operand</dd> |
| <dd><code>op2Decimal</code> - byte array that holds the second Packed Decimal operand</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the second operand is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the second operand</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if op1Decimal == op2Decimal, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="notEqualsPackedDecimal(byte[],int,int,byte[],int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>notEqualsPackedDecimal</h4> |
| <pre class="methodSignature">public static boolean notEqualsPackedDecimal​(byte[] op1Decimal, |
| int op1Offset, |
| int op1Precision, |
| byte[] op2Decimal, |
| int op2Offset, |
| int op2Precision)</pre> |
| <div class="block">Checks if the two Packed Decimal operands are unequal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>op1Decimal</code> - byte array that holds the first Packed Decimal operand</dd> |
| <dd><code>op1Offset</code> - offset into <code>op1Decimal</code> where the first operand is located</dd> |
| <dd><code>op1Precision</code> - number of Packed Decimal digits for the first operand</dd> |
| <dd><code>op2Decimal</code> - byte array that holds the second Packed Decimal operand</dd> |
| <dd><code>op2Offset</code> - offset into <code>op2Decimal</code> where the second operand is located</dd> |
| <dd><code>op2Precision</code> - number of Packed Decimal digits for the second operand</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if op1Decimal != op2Decimal, false otherwise</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="shiftRightPackedDecimal(byte[],int,int,byte[],int,int,int,boolean,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>shiftRightPackedDecimal</h4> |
| <pre class="methodSignature">public static void shiftRightPackedDecimal​(byte[] destination, |
| int destinationOffset, |
| int destinationPrecision, |
| byte[] source, |
| int sourceOffset, |
| int sourcePrecision, |
| int shiftAmount, |
| boolean round, |
| boolean checkOverflow)</pre> |
| <div class="block">Right shift, and optionally round, a Packed Decimal. If the resultant is zero, |
| it can either be a positive zero 0x0C or a negative zero 0x0D.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>destination</code> - byte array that holds the result of the right shift (and rounding)</dd> |
| <dd><code>destinationOffset</code> - offset into <code>destination</code> where the result Packed Decimal is located</dd> |
| <dd><code>destinationPrecision</code> - number of Packed Decimal digits in the destination</dd> |
| <dd><code>source</code> - byte array that holds the Packed Decimal operand to be right shifted</dd> |
| <dd><code>sourceOffset</code> - offset into <code>source</code> where the operand is located</dd> |
| <dd><code>sourcePrecision</code> - number of Packed Decimal digits in the operand</dd> |
| <dd><code>shiftAmount</code> - amount by which the source will be right shifted</dd> |
| <dd><code>round</code> - if set to true, causes rounding to occur</dd> |
| <dd><code>checkOverflow</code> - if set to true, check for overflow</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></code> - if a decimal overflow occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">IllegalArgumentException</a></code> - if the <code>shiftAmount</code> or <code>sourcePrecision</code> parameter is invalid or |
| the <code>source</code> packed decimal contains invalid sign or digit code</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="shiftLeftPackedDecimal(byte[],int,int,byte[],int,int,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>shiftLeftPackedDecimal</h4> |
| <pre class="methodSignature">public static void shiftLeftPackedDecimal​(byte[] destination, |
| int destinationOffset, |
| int destinationPrecision, |
| byte[] source, |
| int sourceOffset, |
| int sourcePrecision, |
| int shiftAmount, |
| boolean checkOverflow)</pre> |
| <div class="block">Left shift a Packed Decimal appending zeros to the right. In the absence of overflow, the sign |
| of a zero can either be positive 0x0C or negative 0x0D.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>destination</code> - byte array that holds the result of the left shift</dd> |
| <dd><code>destinationOffset</code> - offset into <code>destination</code> where the result Packed Decimal is located</dd> |
| <dd><code>destinationPrecision</code> - number of Packed Decimal digits in the destination</dd> |
| <dd><code>source</code> - byte array that holds the Packed Decimal operand to be left shifted</dd> |
| <dd><code>sourceOffset</code> - offset into <code>source</code> where the operand is located</dd> |
| <dd><code>sourcePrecision</code> - number of Packed Decimal digits in the operand</dd> |
| <dd><code>shiftAmount</code> - amount by which the source will be left shifted</dd> |
| <dd><code>checkOverflow</code> - if set to true, check for overflow</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></code> - if a decimal overflow occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">IllegalArgumentException</a></code> - if the <code>shiftAmount</code> or <code>sourcePrecision</code> parameter is invalid or |
| the <code>source</code> packed decimal contains invalid sign or digit code</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="movePackedDecimal(byte[],int,int,byte[],int,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>movePackedDecimal</h4> |
| <pre class="methodSignature">public static void movePackedDecimal​(byte[] destination, |
| int destinationOffset, |
| int destinationPrecision, |
| byte[] source, |
| int sourceOffset, |
| int sourcePrecision, |
| boolean checkOverflow)</pre> |
| <div class="block">Creates a copy of a Packed Decimal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>destination</code> - byte array representing the destination</dd> |
| <dd><code>destinationOffset</code> - offset into destination <code>destination</code> where the Packed Decimal is located</dd> |
| <dd><code>destinationPrecision</code> - number of Packed Decimal digits for the destination</dd> |
| <dd><code>source</code> - byte array which holds the source Packed Decimal</dd> |
| <dd><code>sourceOffset</code> - offset into <code>source</code> where the Packed Decimal is located</dd> |
| <dd><code>sourcePrecision</code> - number of Packed Decimal digits for the source. Maximum valid precision is 253</dd> |
| <dd><code>checkOverflow</code> - if set to true, moved Packed Decimals are validated, and an <code>IllegalArgumentException</code> or |
| <code>ArithmeticException</code> is thrown if non-zero nibbles are truncated during the move |
| operation. If set to false, no validating is conducted.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">NullPointerException</a></code> - if any of the byte arrays are null</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArrayIndexOutOfBoundsException</a></code> - if an invalid array access occurs</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">IllegalArgumentException</a></code> - if the source Packed Decimal is invalid</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_blank">ArithmeticException</a></code> - if a decimal overflow occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/PackedDecimal.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-files/index-1.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><div style="margin-top: 9px;"><strong>OpenJ9 JDK 11</strong></div></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <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/openj9/issues" target="_blank">Eclipse Openj9 issue.</a><br> Copyright © 1998, 2021, IBM Corp. and others.</small></p> |
| </footer> |
| </body> |
| </html> |