/******************************************************************************* * * Pentaho Data Integration * * Copyright (C) 2002-2013 by Pentaho : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************/ package org.pentaho.di.trans.steps.textfileoutput; import java.io.OutputStream; import java.text.DateFormatSymbols; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.pentaho.di.core.compress.CompressionOutputStream; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.core.row.ValueMetaInterface; import org.pentaho.di.trans.step.BaseStepData; import org.pentaho.di.trans.step.StepDataInterface; /** * @author Matt * @since 22-jan-2005 */ public class TextFileOutputData extends BaseStepData implements StepDataInterface { public int splitnr; public int[] fieldnrs; public NumberFormat nf; public DecimalFormat df; public DecimalFormatSymbols dfs; public SimpleDateFormat daf; public DateFormatSymbols dafs; public CompressionOutputStream out; public OutputStream writer; public DecimalFormat defaultDecimalFormat; public DecimalFormatSymbols defaultDecimalFormatSymbols; public SimpleDateFormat defaultDateFormat; public DateFormatSymbols defaultDateFormatSymbols; public Process cmdProc; public OutputStream fos; public RowMetaInterface outputRowMeta; public byte[] binarySeparator; public byte[] binaryEnclosure; public byte[] binaryNewline; public boolean hasEncoding; public byte[][] binaryNullValue; public boolean oneFileOpened; public List<String> previouslyOpenedFiles; public int fileNameFieldIndex; public ValueMetaInterface fileNameMeta; public Map<String, OutputStream> fileWriterMap; public String fileName; public TextFileOutputData() { super(); nf = NumberFormat.getInstance(); df = (DecimalFormat) nf; dfs = new DecimalFormatSymbols(); daf = new SimpleDateFormat(); dafs = new DateFormatSymbols(); defaultDecimalFormat = (DecimalFormat) NumberFormat.getInstance(); defaultDecimalFormatSymbols = new DecimalFormatSymbols(); defaultDateFormat = new SimpleDateFormat(); defaultDateFormatSymbols = new DateFormatSymbols(); previouslyOpenedFiles = new ArrayList<String>(); fileNameFieldIndex = -1; cmdProc = null; oneFileOpened = false; fileWriterMap = new HashMap<String, OutputStream>(); } List<String> getPreviouslyOpenedFiles() { return previouslyOpenedFiles; } }