39 |
|
|
40 |
package java.io; |
package java.io; |
41 |
|
|
42 |
|
import java.util.Locale; |
43 |
|
import java.util.Formatter; |
44 |
|
|
45 |
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 |
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 |
46 |
* "The Java Language Specification", ISBN 0-201-63451-1 |
* "The Java Language Specification", ISBN 0-201-63451-1 |
47 |
* Status: Believed complete and correct to 1.3 |
* Status: Believed complete and correct to 1.3 |
602 |
print(cs == null ? "null" : cs.subSequence(start, end).toString()); |
print(cs == null ? "null" : cs.subSequence(start, end).toString()); |
603 |
return this; |
return this; |
604 |
} |
} |
605 |
|
|
606 |
|
/** @since 1.5 */ |
607 |
|
public PrintStream printf(String format, Object... args) |
608 |
|
{ |
609 |
|
return format(format, args); |
610 |
|
} |
611 |
|
|
612 |
|
/** @since 1.5 */ |
613 |
|
public PrintStream printf(Locale locale, String format, Object... args) |
614 |
|
{ |
615 |
|
return format(locale, format, args); |
616 |
|
} |
617 |
|
|
618 |
|
/** @since 1.5 */ |
619 |
|
public PrintStream format(String format, Object... args) |
620 |
|
{ |
621 |
|
return format(Locale.getDefault(), format, args); |
622 |
|
} |
623 |
|
|
624 |
|
/** @since 1.5 */ |
625 |
|
public PrintStream format(Locale locale, String format, Object... args) |
626 |
|
{ |
627 |
|
Formatter f = new Formatter(this, locale); |
628 |
|
f.format(format, args); |
629 |
|
return this; |
630 |
|
} |
631 |
} // class PrintStream |
} // class PrintStream |