code: public static String readFileIntoString(URL input) throws IOException
     {
  
        InputStream stream = null;
        InputStreamReader reader = null;
        try
        {
           stream = input.openStream();
           reader = new InputStreamReader(stream);
           return readStreamIntoString(reader);
        }
        finally
        {
           if (reader != null)
              reader.close();
           if (stream != null)
              stream.close();
        }
     }
docs: Reads the contents of a file into a string variable.
  
  @param input url
  @return string of return
  @throws IOException ioException