code: public static String readFile(String fileName, String charset) {
          FileInputStream in = null;
          try {
              in = new FileInputStream(fileName);
              return read(in, charset);
          } catch (IOException e) {
              throw new RuntimeException(e);
          } finally {
              closeQuietly(in);
          }
      }
docs: Reads contents of file fully and returns as string.
  
  @param fileName file name.
  @param charset name of supported charset.
  @return contents of entire file.