# Class JDXExporter

java.lang.Object
jspecview.export.JDXExporter

All Implemented Interfaces:
  `JSVExporter`

public class JDXExporter extends Object implements JSVExporter
class `JDXExporter` contains methods for exporting a JCAMP-DX Spectrum in one of the compression formats DIF, FIX, PAC, SQZ or as x, y values.

Author:
  Debbie-Ann Facey, Khari A. Bryan, Craig A.D. Walters, Prof Robert J. Lancashire

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`newLine`

## Constructor Summary

Constructors
Constructor
Description
`JDXExporter()`

## Method Summary

Modifier and Type
Method
Description
`String`
`exportTheSpectrum(JSViewer viewer, ExportType type, OC out, Spectrum spectrum, int startIndex, int endIndex, PanelData pd, boolean asBase64)`
Exports spectrum in one of several formats

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### newLine

public static final String newLine

## Constructor Details

### JDXExporter

public JDXExporter()

## Method Details

### exportTheSpectrum

public String exportTheSpectrum(JSViewer viewer, ExportType type, OC out, Spectrum spectrum, int startIndex, int endIndex, PanelData pd, boolean asBase64) throws IOException
Exports spectrum in one of several formats

Specified by:
  `exportTheSpectrum` in interface `JSVExporter`
Parameters:
  `viewer` -
  `type` -
  `out` -
  `spectrum` - the spectrum
  `startIndex` -
  `endIndex` -
  `pd` - only for SVG/SVGI
  `asBase64` - TODO
Returns:
  data if path is null
Throws:
  `IOException`