formatter = new LogisticsInventoryFormatter(buffWriter,logger); formatter.logToXMLOutput(inv,startDay.getTime());
formatter = new LogisticsInventoryFormatter(buffWriter,logger,startDay); formatter.logToXMLOutput(inv,alarmService.currentTimeMillis());
    protected String getXMLFromLogPlan(Collection collection,Date startDay) {	 Inventory inv=null;	 int ctr=0;	 for (Iterator i = collection.iterator(); i.hasNext(); ) {	     Object o = (Object) (i.next());	     if(o instanceof Inventory) {		 inv = (Inventory)o;		 ctr++;	     }	 }	 if(ctr > 1) {	     logger.error("More than one inventory at this cluster with asset match");	 }	 if(inv == null) {	     logger.error("No Inventory Match.  Can't send any data");	     return null;	 }	 else {	     StringWriter strWriter = new StringWriter();	     BufferedWriter buffWriter = new BufferedWriter(strWriter);	     LogisticsInventoryFormatter formatter = null;	     formatter = new LogisticsInventoryFormatter(buffWriter,logger);	     formatter.logToXMLOutput(inv,startDay.getTime());	     try {		 buffWriter.flush();		 strWriter.flush();		 buffWriter.close();	     }	     catch(IOException ioe) {		 throw new RuntimeException(				   "Unable to create Servlet support: ",ioe);	     }	     return strWriter.toString();	 }	     }