All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.bingads.v10.bulk.BulkEntityIterable Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 13.0.23.2
Show newest version
package com.microsoft.bingads.v10.bulk;

import com.microsoft.bingads.v10.bulk.entities.BulkEntity;
import com.microsoft.bingads.v10.internal.bulk.BulkStreamReader;
import com.microsoft.bingads.v10.internal.bulk.EntityIterator;
import java.io.Closeable;
import java.io.IOException;
import java.util.Iterator;

/**
 * Allows to iterate through a list of entities stored in a file.
 */
public class BulkEntityIterable implements Iterable, Closeable {

    private final BulkStreamReader reader;
    private final boolean isForFullDownload;
    
    private final EntityIterator entityIterator;

    /**
     * Reserved for internal use.
     *
     * @param reader the bulk stream reader instance
     * @param isForFullDownload is the reader for full download
     */
    public BulkEntityIterable(BulkStreamReader reader, boolean isForFullDownload) {
        this.reader = reader;
        this.isForFullDownload = isForFullDownload;
        entityIterator = new EntityIterator(reader, isForFullDownload);
    }

    @Override
    public Iterator iterator() {
        return entityIterator;
    }
    
    @Override
    public void close() throws IOException {
        reader.close();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy