A convenience method to write a formatted string to this writer using
the specified format string and arguments. If automatic flushing is
enabled, calls to this method will flush the output buffer.
An invocation of this method of the form out.printf(l, format,
args) behaves in exactly the same way as the invocation
out.format(l, format, args)
Returns:
This writer
Parameters:
-
l - The {@linkplain java.util.Locale locale} to apply during
formatting. If
l is
null then no localization
is applied.
-
format - A format string as described in
Format string syntax.
-
args - Arguments referenced by the format specifiers in the format
string. If there are more arguments than format specifiers, the
extra arguments are ignored. The number of arguments is
variable and may be zero. The maximum number of arguments is
limited by the maximum dimension of a Java array as defined by
the
Java
Virtual Machine Specification. The behaviour on a
null argument depends on the
conversion.
Throws:
-
IllegalFormatException - If a format string contains an illegal syntax, a format
specifier that is incompatible with the given arguments,
insufficient arguments given the format string, or other
illegal conditions. For specification of all possible
formatting errors, see the
Details section of the
formatter class specification.
-
NullPointerException - If the
format is
null
Since:
1.5