How to read bytes line by line in Java using NIO or apache commons IO? Whichever is more efficent -


i have bunch of bytes written line line file each line can have varying number of bytes , need read them line line wondering how in efficient way using nio or apache commons io? trying see if there way api can take care of allocation , deallocation of buffers since dont know length of bytes in each line. can read string , .getbytes().length() sounds bit awkward.

if file consists of lines, can read millions of lines second bufferedreader.readline(). don't need else. in case nio doesn't support reading lines in way shape or form.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -