title: Is there any way to get the size in bytes of a string in Java?
body: <p>I need the size in bytes of each line in a file, so I can get a percentage of the file read. I already got the size of the file with <code>file.length()</code>, but how do I get each line's size?</p>