PrintWriter again
Oskar Liljeblad
osk@hem.passagen.se
Sun Aug 6 00:55:00 GMT 2000
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)
More information about the Java
mailing list