This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: PrintWriter again
On Saturday, August 05, 2000 at 18:48, Tom Tromey wrote:
> What do you do if print(String) is called and the string has an
> embedded newline?
Yes, I do look for newline sequences within the line...
What I really want is to override one or more methods which all output
goes though. So I can provide my own buffering mechanism. I also need
PrintWriter because of its nice interface. I realize now that it isn't
as simple as it seems. I think changing PrintWriter as I described
here would not solve the problem entirely, even if it would make the
class behave more like Sun's implementation.
> However, I don't have a very strong feeling about this. Obviously
> this change is going to have a performance cost, but it can't be very
> large. So I'm inclined to make this change. Anybody oppose this?
Hm, you have made me change my mind about this :). I agree that the
javadoc doesn't say exactly how it should be implemented. So basicly
I rest my case.
Oskar Liljeblad (osk@hem.passagen.se)