Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #11188
| From | markspace <-@.> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: append() vs. write() |
| Date | 2012-01-10 13:30 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <jeialn$pco$1@dont-email.me> (permalink) |
| References | <3d2746a6-f57c-4fa1-b547-dfddc23bb6b6@n30g2000yqd.googlegroups.com> |
On 1/10/2012 8:17 AM, Benjamin Trendelkamp-Schroer wrote:
> ii) Use a buffered writer which is adviced as being good practice in
> all tutorials since it has a buffered write method. But as far as I
> understand Formatter does only use the format method of the Appendable
> interface and not the bufered write method. If my Matrix gets very
Well, no and no. No, Formatter has several constructors with different
arguments, one of which is Appendable.
But also, no you CAN use BufferedWriter because it is an Appendable
also. Double check my reading of the docs but I'm sure that's what it says.
<http://docs.oracle.com/javase/7/docs/api/java/io/BufferedWriter.html>
"All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable"
So you can just use a BufferedWriter, no problem.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
append() vs. write() Benjamin Trendelkamp-Schroer <benjamin.trendelkampschroer@googlemail.com> - 2012-01-10 08:17 -0800
Re: append() vs. write() Jeff Higgins <jeff@invalid.invalid> - 2012-01-10 13:14 -0500
Re: append() vs. write() markspace <-@.> - 2012-01-10 13:30 -0800
Re: append() vs. write() Jeff Higgins <jeff@invalid.invalid> - 2012-01-10 16:48 -0500
Re: append() vs. write() Jeff Higgins <jeff@invalid.invalid> - 2012-01-10 17:15 -0500
Re: append() vs. write() Jeff Higgins <jeff@invalid.invalid> - 2012-01-10 18:35 -0500
Re: append() vs. write() Jeff Higgins <jeff@invalid.invalid> - 2012-01-10 19:01 -0500
Re: append() vs. write() Lew <noone@lewscanon.com> - 2012-01-10 18:06 -0800
csiph-web