OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 149 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 149 Rev 180
Line 27... Line 27...
27
import java.io.File;
27
import java.io.File;
28
import java.io.FileOutputStream;
28
import java.io.FileOutputStream;
29
import java.io.IOException;
29
import java.io.IOException;
30
import java.io.OutputStream;
30
import java.io.OutputStream;
31
import java.text.DateFormat;
31
import java.text.DateFormat;
-
 
32
import java.text.ParseException;
32
import java.text.SimpleDateFormat;
33
import java.text.SimpleDateFormat;
33
import java.util.Date;
34
import java.util.Date;
34
 
35
 
35
public abstract class AbstractExport {
36
public abstract class AbstractExport {
36
 
37
 
Line 168... Line 169...
168
        return Tuple2.<File, Number> create(fOut, count);
169
        return Tuple2.<File, Number> create(fOut, count);
169
    }
170
    }
170
 
171
 
171
    protected abstract int fetchData(Date from, Date to, SQLRow selectedJournal, boolean onlyNew);
172
    protected abstract int fetchData(Date from, Date to, SQLRow selectedJournal, boolean onlyNew);
172
 
173
 
173
    protected abstract void export(final OutputStream out) throws IOException;
174
    protected abstract void export(final OutputStream out) throws IOException, ParseException;
174
 
175
 
175
    public static final String fixedLengthLeftAlign(final String str, final int fixedWidth) {
176
    public static final String fixedLengthLeftAlign(final String str, final int fixedWidth) {
176
        if (str.length() >= fixedWidth) {
177
        if (str.length() >= fixedWidth) {
177
            return str.substring(0, fixedWidth);
178
            return str.substring(0, fixedWidth);
178
        }
179
        }