You can find a number of other formatting tools :
FreeHEP Java Library
- ScientficFormat
- this class comes with a library of classes developed for applications
in High Energy Physics (HEP). It is a free and open source libarary.
Package and class specifications can be found in the API
documentation.
printf package
- Henrik Bengtsson - provides formatting methods fprintf(),
printf()
and sprintf(),
which follow their counterparts in C. Free for personal use.
printf
for Java - this Java version of the C routine comes as shareware
at sharkysoft.com.
Quantity
Library - nanoTITAN - this free open source library provides
various classes for dealing with physical quantities and also comes
with some utilities. These include NumberFormatSI,
ExponentialNotationSI,
and ScientificNotationSI
for scientific formatting.
International Components
for Unicode for Java (ICU4J) - DecimalFormat
- The earlier versions of Sun's java.text.DecimalFormat
did not provide for scientific notation and some other desirable
features, so IBM developed its own version.
Initially IBM provided this class in its own text
package but they later donated the package to the open source ICU4J
project, which provides a large number of tools for text handling.
The ICU4J, and the corresponding ICU4C for C/C++, is an open-source
project that provides Java with internationalization and Unicode
support classes that can be added to the JDK packages. (Unicode
is used for the coding of all text in Java. We will discuss it in
detail in a later chapter.)
The ICU4J set of packages can be downloaded for free but it is a
multi-megabyte set of files. So it may not be worth the resources
simply to obtain access its DecimalFormat
class. A description of the DecimalFormat class is found at
oss.software.ibm.com/icu/userguide/formatNumbers.html
and the specifications page in the API at
oss.software.ibm.com/icu4j/doc/
|