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

com.codetaco.funnel.publisher.FixedLengthSysoutPublisher Maven / Gradle / Ivy

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

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

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.codetaco.funnel.parameters.FunnelContext;

/**
 * 

* FixedLengthSysoutPublisher class. *

* * @author Chris DeGreef [email protected] */ public class FixedLengthSysoutPublisher extends FixedLengthPublisher { static final private Logger logger = LoggerFactory.getLogger(FixedLengthSysoutPublisher.class); /** *

* Constructor for FixedLengthSysoutPublisher. *

* * @param _context a {@link com.codetaco.funnel.parameters.FunnelContext} * object. * @throws java.text.ParseException if any. * @throws java.io.IOException if any. */ public FixedLengthSysoutPublisher(final FunnelContext _context) throws ParseException, IOException { super(_context); logger.debug("fixed length sysout publisher activated"); } /** {@inheritDoc} */ @Override public void close() throws Exception { super.close(); ((DataOutputStream) writer).close(); logger.debug("closing SYSOUT"); } /** * @param _context */ @Override void openOutput(final FunnelContext _context) throws IOException, FileNotFoundException { writer = new DataOutputStream(System.out); logger.debug("writing SYSOUT"); } /** {@inheritDoc} */ @Override public void reset() throws IOException { // intentionally empty } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy