*/ } else if (writeEncodedXMLToFile) { String fileName = getClusterName () + "_encoded_" + numFilesWritten++; System.out.println (getName () + ".sendData : Writing XML to file " + fileName); FileOutputStream temp = new FileOutputStream (fileName); bytes = data.getBytes (); temp.write(bytes); temp.flush (); temp.close ();
  public void sendData(URLConnection connection, String data, Document doc) throws IOException {    if (myExtraOutput) {	  System.out.println (getName () + ".sendData - Sending " + data.length () + " characters.");	  System.out.println ("\tData=" + data.substring (0,													  (data.length () > 100) ? 100 : data.length()));    }    OutputStream os = new BufferedOutputStream(connection.getOutputStream ());    byte [] bytes = data.getBytes ();    os.write(bytes);	if (doc != null) {	  writeDocToStream (doc, os);	  if (writeXMLToFile) {		FileOutputStream temp = new FileOutputStream ("temp");		writeDocToStream (doc, temp);	  }	}	    os.flush ();    os.close ();  }