public static List<String> splitLines(final String content){
  if (content == null || content.length() == 0)   return Collections.emptyList();
  String[] lines=content.split("[\\r]?\\n");
  return Arrays.asList(lines);
}

public static List < String > splitLines ( final String content ) { if ( content == null || content . length ( ) == 0 ) return Collections . emptyList ( ) ; String [ ] lines = content . split ( "[\\r]?\\n" ) ; return Arrays . asList ( lines ) ; }
split the supplied content into lines , returning each line as an element in the returned list .
