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

org.jsapar.compose.csv.quote.NeverQuote Maven / Gradle / Ivy

Go to download

JSaPar is a Java library providing a schema based parser and composer of almost collected sorts of delimited and fixed width files.

The newest version!
package org.jsapar.compose.csv.quote;

import java.io.IOException;
import java.io.Writer;

/**
 * Never quotes and never alters the value except for limiting number of characters written.
 */
final public class NeverQuote implements Quoter {
    private final ValueComposer valueComposer;

    public NeverQuote(int maxLength) {
        valueComposer = maxLength >=0 ? new MaxLengthComposer(maxLength) : new AtomicValueComposer();
    }

    @Override
    public void writeValue(Writer writer, String value) throws IOException {
        valueComposer.writeValue(writer, value);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy