Java Reference
In-Depth Information
•
IllegalFormatFlagsException
The combination of flags was invalid.
•
IllegalFormatPrecisionException
The precision value was invalid, or
the conversion does not support a precision value.
•
IllegalFormatWidthException
The width value was invalid, or the
conversion does not support a width value.
•
MissingFormatArgumentException
No argument was supplied in the
position expected by a conversion modifier.
•
MissingFormatWidthException
No width was specified when it was
required.
•
UnknownFormatConversionException
A format's conversion indicator
was not known.
•
UnknownFormatFlagsExceptions
An unknown flag was given.
22.1.8. The
Formatter
Class
A
Formatter
object is always associated with some object that is the des-
tination for the formatted text produced by the formatter. By default the
destination is a
StringBuilder
. The other destination objects that can be
passed to the various constructors are
•
An arbitrary
Appendable
object. This is any object to which charac-
methods defined by
Appendable
.
•
A file, specified either as a
File
object or a string representing the
file name
•
An
OutputStream
The constructors for the byte-oriented destinations (files and output
streams) either work with the platform's default encoding or take an
additional string parameter that represents the character set encoding