Re: Reading strings using BufferedReader.readLine() is too slow
- From: Tom Hawtin <usenet@xxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jun 2007 15:46:31 +0100
Gordon Beaton wrote:
Your subject line is wrong, it isn't BufferedReader.readline() which
is slow. The real problem is, as you correctly point out in the text,
string concatenation.
Also, if you don't want to create a String per line, blocks can be read into a char array with Reader.read(char[]) (note: read does not necessarily fill the entire array, even if not at the end of file). You can then drop the BufferedReader, as all that will be doing is an additional copy of the data.
Tom Hawtin
.
- References:
- Reading strings using BufferedReader.readLine() is too slow
- From: wicli_pucli
- Re: Reading strings using BufferedReader.readLine() is too slow
- From: Gordon Beaton
- Reading strings using BufferedReader.readLine() is too slow
- Prev by Date: need material
- Next by Date: Re: Using mandatory libraries (custom class loading vs. expanding libraries)
- Previous by thread: Re: Reading strings using BufferedReader.readLine() is too slow
- Next by thread: Re: Reading strings using BufferedReader.readLine() is too slow
- Index(es):