double[][] arrays = spectrum.getMzAndIntensityAsArray();
// write the m/z values
br.write(getCurrentTabSpace() + "<mzArrayBinary>" + System.getProperty("line.separator"));
tabCounter++;
BinaryArrayImpl mzValues = new BinaryArrayImpl(arrays[0], BinaryArrayImpl.LITTLE_ENDIAN_LABEL);
br.write(getCurrentTabSpace() + "<data precision=\"" + mzValues.getDataPrecision() + "\" endian=\"" + mzValues.getDataEndian()
+ "\" length=\"" + mzValues.getDataLength() + "\">" + mzValues.getBase64String() + "</data>" + System.getProperty("line.separator"));
tabCounter--;
br.write(getCurrentTabSpace() + "</mzArrayBinary>" + System.getProperty("line.separator"));
// write the intensity values
br.write(getCurrentTabSpace() + "<intenArrayBinary>" + System.getProperty("line.separator"));
tabCounter++;
BinaryArrayImpl intValues = new BinaryArrayImpl(arrays[1], BinaryArrayImpl.LITTLE_ENDIAN_LABEL);
br.write(getCurrentTabSpace() + "<data precision=\"" + intValues.getDataPrecision() + "\" endian=\"" + intValues.getDataEndian()
+ "\" length=\"" + intValues.getDataLength() + "\">" + intValues.getBase64String() + "</data>" + System.getProperty("line.separator"));
tabCounter--;
br.write(getCurrentTabSpace() + "</intenArrayBinary>" + System.getProperty("line.separator"));
tabCounter--;
br.write(getCurrentTabSpace() + "</spectrum>" + System.getProperty("line.separator"));