Is there a way to read a text file using java but the text file has over 20 000 characters -




i have program uses text file store forenames of people problem when use bufferedreader, or scanner read file not work because there many characters in text file (estimated 20 000). , know bufferedreader has limit of 8192 chars , scanner has limit of 1024 chars.

so can read characters without error or of them being left out?

bufferedreader br = new bufferedreader(new filereader(new file("names.txt"))); 

(edit)

i found problem not bufferedreader text file. text file had become corrupted , when remade text file , deleted old 1 worked. thank tried me being idiot.

the buffer size may specified, or default size may used. default large enough purposes. in case , 20,000 characters not , default buffer should more enough.





wiki

Comments

Popular posts from this blog

python - Read npy file directly from S3 StreamingBody -

python - Minimize function with Scipy minimize -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -