Currently I'm using something like :
String[]lines = textContent.split(System.getProperty("line.separator"));
for(String tmpLine : lines){
//do something
}
I'm not very glad of this method because it create an heavy array (let say textContent
can contain a book).
Is there any better solution to iterate over the lines of a String
?