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

com.codetaco.funnel.provider.ProviderFactory Maven / Gradle / Ivy

There is a newer version: 3.0.5
Show newest version
package com.codetaco.funnel.provider;

import java.io.IOException;
import java.text.ParseException;

import com.codetaco.funnel.FunnelDataProvider;
import com.codetaco.funnel.parameters.FunnelContext;

/**
 * 

* ProviderFactory class. *

* * @author Chris DeGreef [email protected] */ public class ProviderFactory { /** *

* create. *

* * @param context a {@link com.codetaco.funnel.parameters.FunnelContext} * object. * @return a {@link com.codetaco.funnel.FunnelDataProvider} object. * @throws java.io.IOException if any. * @throws java.text.ParseException if any. */ static public FunnelDataProvider create(final FunnelContext context) throws IOException, ParseException { if (context.getFixedRecordLengthIn() > 0) return new FixedLengthProvider(context); if (context.getCsv() == null) return new VariableLengthProvider(context); return new CsvProvider(context); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy