static String readFile(String path,Charset encoding) throws IOException {
  byte[] encoded=Files.readAllBytes(Paths.get(path));
  return new String(encoded,encoding);
}

static String readFile ( String path , Charset encoding ) throws IOException { byte [ ] encoded = Files . readAllBytes ( Paths . get ( path ) ) ; return new String ( encoded , encoding ) ; }
reads content from a file
