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
Post a Comment