private static String readStringFromReader(BufferedReader br)
   {

      StringBuilder sb = new StringBuilder();
      try
      {
         boolean done = false;
         do
         {
            String s = br.readLine();
            if (s == null)
            {
               done = true;
            }
            else
            {
               sb.append(s);
               sb.append("\n");
            }
         }
         while (!done);

         br.close();
      }
      catch (java.io.IOException exc)
      {
         JOptionPane.showMessageDialog(null, "Error: " + exc.getMessage(), UIStrings.APPNAME, JOptionPane.ERROR_MESSAGE);
      }

      return sb.toString();
   }