com.microsoft.bingads.v13.internal.reporting.RowReport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of microsoft.bingads Show documentation
Show all versions of microsoft.bingads Show documentation
The Bing Ads Java SDK is a library improving developer experience when working with the Bing Ads services by providing high-level access to features such as Bulk API, OAuth Authorization and SOAP API.
package com.microsoft.bingads.v13.internal.reporting;
import java.io.File;
import java.io.IOException;
import com.microsoft.bingads.v13.reporting.Report;
import com.microsoft.bingads.v13.reporting.ReportFormat;
import com.microsoft.bingads.v13.reporting.ReportRecord;
/**
* Internal use only.
*
*/
public class RowReport extends Report {
private RowReportRecordIterable recordIterable;
private RowReportStreamReader reportStreamReader;
public RowReport(File file, ReportFormat format) throws IOException {
this(new RowReportStreamReader(file, format));
}
public RowReport(String filePath, ReportFormat format) throws IOException {
this(new RowReportStreamReader(filePath, format));
}
private RowReport(RowReportStreamReader reportStreamReader) {
this.reportStreamReader = reportStreamReader;
this.reportHeader = new RowReportHeader(reportStreamReader);
this.recordIterable = new RowReportRecordIterable(reportStreamReader);
}
@Override
public Iterable getReportRecords() {
return recordIterable;
}
@Override
public void close() {
try {
if (reportStreamReader != null) {
reportStreamReader.close();
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}