The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


File Processing

Posted by Matt Gerrans on January 18, 2002 at 4:00 PM

> man, i should learn from u :p

You know, I wasn't really looking too closely at the problem before, I just changed the coding style of the method, mostly. Now, having looked at your other post to Hiran on this subject, it occurs to me that the byte buffer (and MAX_LEN) can be tossed out of the picture entirely. Instead, just read a char at a time an add it to the StringBuffer (or if it is LINEFEED, add '\n' -- I guess the reason for doing this is that it would do the right thing if you are going from Unix to DOS).

  • c c++ java Chin Loong January 19, 2002 at 10:26 AM (0)

Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us