Class DecimalUtil


  • public class DecimalUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] toReusedFixLengthBytes​(int precision, int scale, java.math.BigDecimal decimal, byte[] reuseBuf)
      Convert a BigDecimal to reused fix length bytes, the extra bytes are filled according to the signum.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toReusedFixLengthBytes

        public static byte[] toReusedFixLengthBytes​(int precision,
                                                    int scale,
                                                    java.math.BigDecimal decimal,
                                                    byte[] reuseBuf)
        Convert a BigDecimal to reused fix length bytes, the extra bytes are filled according to the signum.