|
From: | Chris Burdess |
Subject: | Re: [Classpath-inetlib] Problems in gnu.inet.util.LineInputStream and gnu.inet.util.CRLFInputStream |
Date: | Mon, 4 Apr 2005 19:24:55 +0100 |
Robert Mitchell wrote:
On giving you a patch, I unfortunately do not have an easy access to diff: unfortunately I do my development on Windows and do not have a Windows version of diff at this point. I am attaching a version of the file with Unix style end of lines.
Looks good.Revisiting this code, I feel convinced that another approach could work more efficiently. Basically we ensure that the underlying stream supports mark and reset, and use these to return only CRLF delimited chunks of bytes in any one read (there may be reads that don't hit a boundary). In this way we save a lot of array copying.
What do you think? If you have reasonable doubts, I am happy to apply your patch.
-- Chris Burdess
[Prev in Thread] | Current Thread | [Next in Thread] |