code: public void writeTo(IIMWriter writer) throws IOException {
  		final boolean doLog = log != null;
  		for (Iterator<DataSet> i = dataSets.iterator(); i.hasNext();) {
  			DataSet ds = i.next();
  			writer.write(ds);
  			if (doLog) {
  				log.debug("Wrote data set " + ds);
  			}
  		}
  	}
docs: Writes this IIMFile to writer.
  
  @param writer
  writer to write to
  @throws IOException
  if file can't be written to