private boolean addToFile(String line){
  try (BufferedWriter w=Files.newBufferedWriter(file,CHARSET,CREATE,WRITE,APPEND)){
    w.append(line);
    w.newLine();
  }
 catch (  IOException ex) {
    LOGGER.warning("Failed to write stream highlights: " + ex);
    return false;
  }
  return true;
}

private boolean addToFile ( String line ) { try ( BufferedWriter w = Files . newBufferedWriter ( file , CHARSET , CREATE , WRITE , APPEND ) ) { w . append ( line ) ; w . newLine ( ) ; } catch ( IOException ex ) { LOGGER . warning ( "Failed to write stream highlights: " + ex ) ; return false ; } return true ; }
write the given line to the stream highlights file .
