public void write(OutputStream os) throws IOException {
  if (responseFormatType == ResponseFormatType.CSV) {
    writeCsvResponse(os);
  }
 else   if (responseFormatType == ResponseFormatType.JSONAPI) {
    writeJsonApiResponse(os,missingIntervals,volatileIntervals,pagination);
  }
 else {
    writeJsonResponse(os,missingIntervals,volatileIntervals,pagination);
  }
}

public void write ( OutputStream os ) throws IOException { if ( responseFormatType == ResponseFormatType . CSV ) { writeCsvResponse ( os ) ; } else if ( responseFormatType == ResponseFormatType . JSONAPI ) { writeJsonApiResponse ( os , missingIntervals , volatileIntervals , pagination ) ; } else { writeJsonResponse ( os , missingIntervals , volatileIntervals , pagination ) ; } }
writes the response string in the proper format .
