org.jsapar.compose.csv.quote.NeverQuote Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsapar Show documentation
Show all versions of jsapar Show documentation
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);
}
}