if (checksum != null) writeOut(outputstream, " checksum = \"" + checksum.toString() + "\"");
if (checksum != null) { writeOut(outputstream, " checksum = \""); writeOutAttribute(outputstream, checksum.toString()); writeOut(outputstream, "\""); }
  public void toXMLOutputStream (                                   OutputStream outputstream,                                   Hashtable XMLDeclAttribs,                                   String strIndent,                                   boolean dontCloseNode,                                   String newNodeNameString,                                   String noChildObjectNodeName                                )  {    boolean niceOutput = Specification.getInstance().isPrettyXDFOutput();    String indent = "";    indent = indent + strIndent;    String nodeName = getClassXDFNodeName();    //open node    if (niceOutput)      writeOut(outputstream, indent);    writeOut(outputstream, "<" + nodeName );    String href = getHref();    if (href !=null)      writeOut(outputstream, " href = \"" + href + "\"");    String checksum = getChecksum();    if (checksum != null)      writeOut(outputstream, " checksum = \"" + checksum.toString() + "\"");    writeOut(outputstream, ">");  //end of opening code    //write out just the data    XMLDataIOStyle readObj = parentArray.getXMLDataIOStyle();    OutputStream dataOutputStream;    if (href !=null) {  //write out to another file,      try {        dataOutputStream = new FileOutputStream(getHref());      }      catch (IOException e) {        //oops, sth. is wrong, writ out to the passed in OutputStream        dataOutputStream = outputstream;      }    }    else {      // no *href* attribute specified, write out to the passed in OutputStream      dataOutputStream = outputstream;    }    Locator currentLocator = parentArray.createLocator();    AxisInterface fastestAxis = (AxisInterface) parentArray.getAxisList().get(0);    //stores the NoDataValues for the parentArray,    //used in writing out when NoDataException is caught    String NoDataValues[] = new String[fastestAxis.getLength()];    if (parentArray.hasFieldAxis()) {      DataFormat[] dataFormatList = parentArray.getDataFormatList();      for (int i = 0; i < NoDataValues.length; i++) {        DataFormat d =  dataFormatList[i];        if (d != null && d.getNoDataValue() != null)           NoDataValues[i]=d.getNoDataValue().toString();      }    }    else {      DataFormat d = parentArray.getDataFormat();      for (int i = 0; i < NoDataValues.length; i++) {        if (d!=null && d.getNoDataValue() != null)           NoDataValues[i] = d.getNoDataValue().toString();      }    }    if (readObj instanceof TaggedXMLDataIOStyle) {      String[] tagOrder = ((TaggedXMLDataIOStyle)readObj).getAxisTags();      int stop = tagOrder.length;      String[] tags = new String[stop];      for (int i = stop-1; i >= 0 ; i--) {        tags[stop-i-1]  = tagOrder[i];	// System.out.println(tagOrder.get(i));      }      int[] axes = getMaxDataIndex();      stop =axes.length;      int[] axisLength = new int[stop];      for (int i = 0; i < stop; i++) {        axisLength[i] =axes[stop - 1 - i];      }      writeTaggedData(dataOutputStream,                      currentLocator,                      indent,                      axisLength,                      tags,                      0,                      fastestAxis,                      NoDataValues);    }  //done dealing with with TaggedXMLDataIOSytle    else {       if (readObj instanceof DelimitedXMLDataIOStyle) {           writeDelimitedData( dataOutputStream, currentLocator,                               (DelimitedXMLDataIOStyle) readObj,                               fastestAxis, NoDataValues );       }       else {        writeFormattedData(dataOutputStream,                           currentLocator,                           (FormattedXMLDataIOStyle) readObj,                           fastestAxis,                           NoDataValues );       }    }    //close the data section appropriately    if (niceOutput) {      writeOut(outputstream, Constants.NEW_LINE);      writeOut(outputstream, indent);    }    writeOut(outputstream, "</" + nodeName + ">");    if (niceOutput)      writeOut(outputstream, Constants.NEW_LINE);  }