| java.lang.Object com.salmonllc.util.DataTextWriter
DataTextWriter | public class DataTextWriter (Code) | | This object allows you to write a flat text file with data elements separated by Separators and such.
|
Constructor Summary | |
public | DataTextWriter(int iNumCols) Builds a DataTextWriter with each row containing iNumColumns. | public | DataTextWriter(int iNumCols, String sSeparator) Builds a DataTextWriter with each row containing iNumCols and each piece of Data separated by sSeparator. | public | DataTextWriter(int iNumCols, String sSeparator, String sLineBreak) Builds a DataTextWriter with each row containing iNumCols and each piece of Data separated by sSeparator
and row separated by sLineBreak. | public | DataTextWriter(int iNumCols, String sSeparator, String sLineFeed, char cQuoteChar, boolean bQuoted) Builds a DataTextWriter with each row containing iNumColumns and each piece of Data separated by sSeparator
and row separated by sLineBreak and each piece of Data is surrounded by cQuoteChar if bQuoted is true. |
Method Summary | |
public void | addData(int iColumn, String sData) Adds a piece of data to a specific column in this DataTextWriter. | public String | getText() This method returns the Data in DataTextWriter in formatted output string. | public int | getTextLength() This method returns the length of the Data in DataTextWriter in formatted output string. | public void | setLineBreak(String sLineBreak) Sets the LineBreak Separator in this DataTextWriter. | public void | setQuoteCharacter(char cQuoteChar) Sets the Character to be used for Quoting Data Columns in this DataTextWriter. | public void | setQuoted(boolean bQuoted) Sets the Flag to to inicate that Data Columns are to be quoted in this DataTextWriter. | public void | setSeparator(String sSeparator) Sets the Separator to be used for separating individual Data Columns in this DataTextWriter. | public void | writeFile(String sFilename) This method creates a flat file containing the data added to this DataTextWriter. |
DataTextWriter | public DataTextWriter(int iNumCols)(Code) | | Builds a DataTextWriter with each row containing iNumColumns.
Parameters: iNumCols - The number of columns in a row of the DataTextWriter. |
DataTextWriter | public DataTextWriter(int iNumCols, String sSeparator)(Code) | | Builds a DataTextWriter with each row containing iNumCols and each piece of Data separated by sSeparator.
Parameters: iNumCols - The number of columns in a row of the DataTextWriter. Parameters: sSeparator - The separator used to separate data columns in a row. |
DataTextWriter | public DataTextWriter(int iNumCols, String sSeparator, String sLineBreak)(Code) | | Builds a DataTextWriter with each row containing iNumCols and each piece of Data separated by sSeparator
and row separated by sLineBreak.
Parameters: iNumCols - The number of columns in a row of the DataTextWriter. Parameters: sSeparator - The separator used to separate data columns in a row. Parameters: sLineBreak - The separator used to separate individual rows. |
DataTextWriter | public DataTextWriter(int iNumCols, String sSeparator, String sLineFeed, char cQuoteChar, boolean bQuoted)(Code) | | Builds a DataTextWriter with each row containing iNumColumns and each piece of Data separated by sSeparator
and row separated by sLineBreak and each piece of Data is surrounded by cQuoteChar if bQuoted is true.
Parameters: iNumCols - The number of columns in a row of the DataTextWriter. Parameters: sSeparator - The separator used to separate data columns in a row. Parameters: sLineBreak - The separator used to separate individual rows. Parameters: cQuoteChar - The character used to quote indivividual data columns. Parameters: bQuoted - The flag to indicate if data columns are to be quoted. |
addData | public void addData(int iColumn, String sData) throws DataTextWriterException(Code) | | Adds a piece of data to a specific column in this DataTextWriter.
Parameters: iColumn - The column which the specified data belongs to. Parameters: sData - The data for the specified column. |
getText | public String getText()(Code) | | This method returns the Data in DataTextWriter in formatted output string.
Formatted Output |
getTextLength | public int getTextLength()(Code) | | This method returns the length of the Data in DataTextWriter in formatted output string.
Formatted Output |
setLineBreak | public void setLineBreak(String sLineBreak)(Code) | | Sets the LineBreak Separator in this DataTextWriter.
Parameters: sLineBreak - The separator used to separate individual rows. |
setQuoteCharacter | public void setQuoteCharacter(char cQuoteChar)(Code) | | Sets the Character to be used for Quoting Data Columns in this DataTextWriter.
Parameters: cQuoteChar - The character used to quote individual data columns. |
setQuoted | public void setQuoted(boolean bQuoted)(Code) | | Sets the Flag to to inicate that Data Columns are to be quoted in this DataTextWriter.
Parameters: bQuoted - The flag used to indicate if data columns are quoted. |
setSeparator | public void setSeparator(String sSeparator)(Code) | | Sets the Separator to be used for separating individual Data Columns in this DataTextWriter.
Parameters: sSeparator - The separator used to separate individual data columns. |
writeFile | public void writeFile(String sFilename) throws DataTextWriterException(Code) | | This method creates a flat file containing the data added to this DataTextWriter.
Parameters: sFilename - The name of flat file to create. |
|
|