Home | History | Annotate | Download | only in util

Lines Matching defs:Formatter

40  * It's relatively rare to use a {@code Formatter} directly. A variety of classes offer convenience
41 * methods for accessing formatter functionality.
134 * this formatter).
300 * It's also possible to format dates and times with {@code Formatter}, though you should
303 * The facilities offered by {@code Formatter} are low-level and place the burden of localization
513 * {@code %t} with {@code %T} will uppercase the field according to the rules of the formatter's
521 * <p><i>Thread safety</i>. Formatter is not thread-safe.
528 public final class Formatter implements Closeable, Flushable {
598 * Constructs a {@code Formatter}.
606 public Formatter() {
611 * Constructs a {@code Formatter} whose output will be written to the
618 * the output destination of the {@code Formatter}. If {@code a} is {@code null},
621 public Formatter(Appendable a) {
626 * Constructs a {@code Formatter} with the specified {@code Locale}.
632 * the {@code Locale} of the {@code Formatter}. If {@code l} is {@code null},
635 public Formatter(Locale l) {
640 * Constructs a {@code Formatter} with the specified {@code Locale}
645 * the output destination of the {@code Formatter}. If {@code a} is {@code null},
648 * the {@code Locale} of the {@code Formatter}. If {@code l} is {@code null},
651 public Formatter(Appendable a, Locale l) {
661 * Constructs a {@code Formatter} whose output is written to the specified file.
663 * <p>The charset of the {@code Formatter} is the default charset.
670 * destination for the {@code Formatter}. The file will be truncated to
672 * created. The output of the {@code Formatter} is buffered.
678 public Formatter(String fileName) throws FileNotFoundException {
684 * Constructs a {@code Formatter} whose output is written to the specified file.
691 * destination for the {@code Formatter}. The file will be truncated to
693 * created. The output of the {@code Formatter} is buffered.
695 * the name of the charset for the {@code Formatter}.
703 public Formatter(String fileName, String csn) throws FileNotFoundException,
709 * Constructs a {@code Formatter} with the given {@code Locale} and charset,
714 * destination for the {@code Formatter}. The file will be truncated to
716 * created. The output of the {@code Formatter} is buffered.
718 * the name of the charset for the {@code Formatter}.
720 * the {@code Locale} of the {@code Formatter}. If {@code l} is {@code null},
729 public Formatter(String fileName, String csn, Locale l)
736 * Constructs a {@code Formatter} whose output is written to the specified {@code File}.
738 * The charset of the {@code Formatter} is the default charset.
745 * {@code Formatter}. The {@code File} will be truncated to zero size if the {@code File}
747 * {@code Formatter} is buffered.
753 public Formatter(File file) throws FileNotFoundException {
758 * Constructs a {@code Formatter} with the given charset,
766 * {@code Formatter}. The {@code File} will be truncated to zero size if the {@code File}
768 * {@code Formatter} is buffered.
770 * the name of the charset for the {@code Formatter}.
778 public Formatter(File file, String csn) throws FileNotFoundException,
784 * Constructs a {@code Formatter} with the given {@code Locale} and charset,
789 * {@code Formatter}. The {@code File} will be truncated to zero size if the {@code File}
791 * {@code Formatter} is buffered.
793 * the name of the charset for the {@code Formatter}.
795 * the {@code Locale} of the {@code Formatter}. If {@code l} is {@code null},
804 public Formatter(File file, String csn, Locale l)
822 * Constructs a {@code Formatter} whose output is written to the specified {@code OutputStream}.
824 Formatter} is the default charset.
830 * the stream to be used as the destination of the {@code Formatter}.
832 public Formatter(OutputStream os) {
838 * Constructs a {@code Formatter} with the given charset,
845 * the stream to be used as the destination of the {@code Formatter}.
847 * the name of the charset for the {@code Formatter}.
851 public Formatter(OutputStream os, String csn) throws UnsupportedEncodingException {
856 * Constructs a {@code Formatter} with the given {@code Locale} and charset,
860 * the stream to be used as the destination of the {@code Formatter}.
862 * the name of the charset for the {@code Formatter}.
864 * the {@code Locale} of the {@code Formatter}. If {@code l} is {@code null},
869 public Formatter(OutputStream os, String csn, Locale l) throws UnsupportedEncodingException {
875 * Constructs a {@code Formatter} whose output is written to the specified {@code PrintStream}.
877 * <p>The charset of the {@code Formatter} is the default charset.
883 * the {@code PrintStream} used as destination of the {@code Formatter}. If
887 public Formatter(PrintStream ps) {
902 * Returns the {@code Locale} of the {@code Formatter}.
904 * @return the {@code Locale} for the {@code Formatter} or {@code null} for no {@code Locale}.
906 * if the {@code Formatter} has been closed.
914 * Returns the output destination of the {@code Formatter}.
916 * @return the output destination of the {@code Formatter}.
918 * if the {@code Formatter} has been closed.
932 * if the {@code Formatter} has been closed.
941 * Flushes the {@code Formatter}. If the output destination is {@link Flushable},
945 * if the {@code Formatter} has been closed.
959 * Closes the {@code Formatter}. If the output destination is {@link Closeable},
962 * If the {@code Formatter} has been closed, then calling the this method will have no
966 * {@code Formatter} has been closed will raise a {@code FormatterClosedException}.
982 * Returns the last {@code IOException} thrown by the {@code Formatter}'s output
986 * @return the last {@code IOException} thrown by the {@code Formatter}'s output
994 * Writes a formatted string to the output destination of the {@code Formatter}.
1002 * @return this {@code Formatter}.
1008 * if the {@code Formatter} has been closed.
1010 public Formatter format(String format, Object... args) {
1015 * Writes a formatted string to the output destination of the {@code Formatter}.
1020 * parameter does not change this Formatter's default {@code Locale}
1029 * @return this {@code Formatter}.
1035 * if the {@code Formatter} has been closed.
1037 public Formatter format(Locale l, String format, Object... args) {
1494 * by digits appropriate to this formatter's locale. Other characters remain unchanged.
1512 * size, but you can't access that from Formatter, and the default is every 3 digits.