Ancient Programming

What I encounter in my software part of life is in danger of being commented upon here

  • Jacob von Eyben

    MeAfter finishing my education in 2002 I have been working as a Systems Architect for the danish consulting company Nordija. My primary area is the Java platform with particular interest for what could be called lightweight architecture. That includes technologies like Spring, EJB 3, Hibernate, JPA, Acegi etc. Besides the Java platform I have interest in other languages like Ruby, Actionscript 3 (for flex development) and others.

Fixedformat4j 1.1.1 released

Posted by jeyben on May 30th, 2008

We use fixedformat4j on my current project and I am developing fixedformat4j along the way. We have found the initial 1.0.0 release lacking in the ability to parse signed numbers like:

00011050+, that equals a two digit signed bigdecimal number 100.50


The fixedformatnumber annotation was introduced with the ability to add a signed attribute.

This is how you would annotate your method to be able to read and write a string like 000010050+:

...
@Field(offset = 1, length = 10, align = Align.RIGHT, paddingChar = '0')
@FixedFormatDecimal(useDecimalDelimiter = true)
@FixedFormatNumber(sign = Sign.APPEND)
public BigDecimal getBigDecimalData() {
  return bigDecimalData;
}
...

This was added in version 1.1.0, but some bugs was spotted and fixed so quickly a 1.1.1 version was released.

Feel free to download the latest version and take a look at the changelist.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>