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

com.codetaco.funnel.provider.FixedLengthInputCache 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.io.InputStream;

import com.codetaco.funnel.parameters.FunnelContext;

/**
 * 

* FixedLengthInputCache class. *

* * @author Chris DeGreef [email protected] */ public class FixedLengthInputCache extends AbstractInputCache { /** *

* Constructor for FixedLengthInputCache. *

* * @param _context a {@link com.codetaco.funnel.parameters.FunnelContext} * object. * @param _source a {@link java.io.InputStream} object. * @throws java.io.IOException if any. */ public FixedLengthInputCache(final FunnelContext _context, final InputStream _source) throws IOException { super(_context, _source); } @Override void postOpenVerification() throws IOException { if (length() % context.getFixedRecordLengthIn() != 0) throw new IOException("file size (" + length() + ") not even multiple of record size (" + context.getFixedRecordLengthIn() + ")"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy