code: private static String readStreamIntoString(Reader reader) throws IOException
     {
        StringBuilder s = new StringBuilder();
        char a[] = new char[0x10000];
        while (true)
        {
           int l = reader.read(a);
           if (l == -1)
              break;
           if (l <= 0)
              throw new IOException();
           s.append(a, 0, l);
        }
        return s.toString();
     }
docs: Reads the contents of a stream into a string variable.
  
  @param reader url
  @return string of return
  @throws IOException ioException