public static int putBigDecimal ( byte [ ] bytes , int offset , BigDecimal val ) { if ( bytes == null ) { return offset ; } byte [ ] valueBytes = val . unscaledValue ( ) . toByteArray ( ) ; byte [ ] result = new byte [ valueBytes . length + SIZEOF_INT ] ; offset = putInt ( result , offset , val . scale ( ) ) ; return putBytes ( result , offset , valueBytes , 0 , valueBytes . length ) ; }
Put a BigDecimal value out to the specified byte array position .