algoliasearch/src/offline/java/com/algolia/search/saas/OfflineIndex.java
private File writeTmpJSONFile(@NonNull Collection<JSONObject> objects) throws AlgoliaException {
        // TODO: Maybe split in several files if too big?
        // TODO: Stream writing.
        JSONArray array = new JSONArray();
        for (JSONObject object : objects) {
            array.put(object);
        }
        return writeTempFile(array.toString());
    }
private File writeTmpJSONFile(@NonNull Collection<JSONObject> objects) throws AlgoliaException {
        // TODO: Maybe split in several files if too big?
        // TODO: Stream writing.
        JSONArray array = new JSONArray();
        for (JSONObject object : objects) {
            array.put(object);
        }
        return writeTempFile(array.toString());
    }
private File writeTmpJSONFile ( @ NonNull Collection < JSONObject > objects ) throws AlgoliaException { // TODO: Maybe split in several files if too big? // TODO: Stream writing. JSONArray array = new JSONArray ( ) ; for ( JSONObject object : objects ) { array . put ( object ) ; } return writeTempFile ( array . toString ( ) ) ; }
Write a temporary file containing JSON objects. The files are written as an array.

@param objects JSON objects to write.
@return Path to the created file.
@throws AlgoliaException
Write a temporary file containing JSON objects . The files are written as an array .