com.redislabs.riot.cli.file.FileExportOptions Maven / Gradle / Ivy
package com.redislabs.riot.cli.file;
import java.io.IOException;
import java.io.Writer;
import java.util.Arrays;
import java.util.Locale;
import java.util.Map;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.file.FlatFileHeaderCallback;
import org.springframework.batch.item.file.FlatFileItemWriter;
import org.springframework.batch.item.json.JacksonJsonObjectMarshaller;
import org.springframework.batch.item.support.AbstractItemStreamItemWriter;
import org.springframework.core.io.Resource;
import org.springframework.core.io.WritableResource;
import org.springframework.util.Assert;
import com.redislabs.riot.file.FlatResourceItemWriterBuilder;
import com.redislabs.riot.file.JsonResourceItemWriterBuilder;
import picocli.CommandLine.Option;
public class FileExportOptions extends FileOptions {
@Option(names = "--append", description = "Append to file if it exists")
private boolean append;
@Option(names = "--force-sync", description = "Force-sync changes to disk on flush")
private boolean forceSync;
@Option(names = "--line-sep", description = "String to separate lines (default: system default)", paramLabel = "")
private String lineSeparator = FlatFileItemWriter.DEFAULT_LINE_SEPARATOR;
@Option(names = "--format", description = "Format string used to aggregate items", paramLabel = "")
private String format;
@Option(names = "--locale", description = "Locale", paramLabel = "")
private Locale locale = Locale.ENGLISH;
@Option(names = "--max-length", description = "Max length of the formatted string", paramLabel = "")
private Integer maxLength;
@Option(names = "--min-length", description = "Min length of the formatted string", paramLabel = "")
private Integer minLength;
public ItemWriter
© 2015 - 2025 Weber Informatics LLC | Privacy Policy