planetj.helpers
Class CSVFileDescriptor

java.lang.Object
  |
  +--planetj.helpers.FileDescriptor
        |
        +--planetj.helpers.CSVFileDescriptor

public class CSVFileDescriptor
extends FileDescriptor

CSVFileDescriptor is to only be created via planetj.helpers.CSVHelper.newCSVFileDescriptor(); This descriptor will hold attributes about a CSV file such as: fileName, delimiter, etc... Creation date: (12/4/2001 10:11:14 PM)


Field Summary
 
Fields inherited from class planetj.helpers.FileDescriptor
COLUMN_HEADINGS_EXTERNAL, COLUMN_HEADINGS_INTERNAL, COLUMN_HEADINGS_NONE, OUTPUT_ROWS_ALL, OUTPUT_ROWS_SCREEN, OUTPUT_ROWS_SELECTED
 
Method Summary
 char getDelimiter()
          Returns the delimiter Defaults to comma ',' Creation date: (12/5/2001 1:42:26 AM)
 char getLeadingDelimiter()
          This is the delimiter that will appear as the first char of the row in the CSV This could be used if the whole output file needed to be a single line If mLeadingDelimiter = '×' (i.e.
 Writer getWriter()
          Gets the writer to write to.
 boolean isLeadingDelimiterUsed()
          Returns false if mLeadingDelimiter is an empty char {' '} Creation date: (12/5/2001 2:35:02 AM)
 boolean isOutputAsSingleLine()
          If true then (i.e.
 void setDelimiter(char newDelimiter)
          Be sure to ensure the delimiter will not show up in your CSV data.
 void setLeadingDelimiter(char newLeadingDelimiter)
          This is the delimiter that will appear as the first char of the row in the CSV This could be used if the whole output file needed to be a single line If mLeadingDelimiter = '×' (i.e.
 void setOutputAsSingleLine(boolean newOutputAsSingleLine)
          If true then (i.e.
 void setWriter(Writer newWriter)
          Sets the writer to write to.
 
Methods inherited from class planetj.helpers.FileDescriptor
getColumnHeadingsDisplayType, getDisplayColumns, getFileName, getOutputRowType, getPassword, getSystemName, getUserId, isAppendToFile, setAppendToFile, setColumnHeadingsDisplayType, setDisplayColumns, setFileName, setOutputRowType, setPassword, setSystemName, setUserId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDelimiter

public char getDelimiter()
Returns the delimiter Defaults to comma ',' Creation date: (12/5/2001 1:42:26 AM)

Returns:
char

getLeadingDelimiter

public char getLeadingDelimiter()
This is the delimiter that will appear as the first char of the row in the CSV This could be used if the whole output file needed to be a single line If mLeadingDelimiter = '×' (i.e. ×Tyler,Holm×Justin,Epstein×Paul,Holm×Wes,King×Nate,Levis The above expample would actually be 5 rows, but all printed in the CSV on a single line **NOTE** mOutputAsSingleLine must be set to true.

If mOutputAsSingleLine is false the above example would look like ×Tyler,Holm ×Justin,Epstein ×Paul,Holm ×Wes,King ×Nate,Levis

mLeadingDelimiter will default to a empty space {''} Creation date: (12/5/2001 2:24:16 AM)

Returns:
char

getWriter

public Writer getWriter()
Gets the writer to write to. If this is null, then the output is returned as one huge String from the CSVHelper; if this isn't null then any generated CSV will be written to the writer and not returned from CSVHelper.


isLeadingDelimiterUsed

public boolean isLeadingDelimiterUsed()
Returns false if mLeadingDelimiter is an empty char {' '} Creation date: (12/5/2001 2:35:02 AM)


isOutputAsSingleLine

public boolean isOutputAsSingleLine()
If true then (i.e. ×Tyler,Holm×Justin,Epstein×Paul,Holm×Wes,King×Nate,Levis The above expample would actually be 5 rows, but all printed in the CSV on a single line **NOTE** mOutputAsSingleLine must be set to true.

If mOutputAsSingleLine is false the above example would look like ×Tyler,Holm ×Justin,Epstein ×Paul,Holm ×Wes,King ×Nate,Levis

mOutputAsSingleLine defaults to false; Creation date: (12/5/2001 2:24:16 AM)

Returns:
boolean

setDelimiter

public void setDelimiter(char newDelimiter)
Be sure to ensure the delimiter will not show up in your CSV data. Examples: (alt 0215) × (alt 0164) ¤ Creation date: (12/5/2001 1:42:26 AM)

Parameters:
newDelimiter - char

setLeadingDelimiter

public void setLeadingDelimiter(char newLeadingDelimiter)
This is the delimiter that will appear as the first char of the row in the CSV This could be used if the whole output file needed to be a single line If mLeadingDelimiter = '×' (i.e. ×Tyler,Holm×Justin,Epstein×Paul,Holm×Wes,King×Nate,Levis The above expample would actually be 5 rows, but all printed in the CSV on a single line **NOTE** mOutputAsSingleLine must be set to true.

If mOutputAsSingleLine is false the above example would look like ×Tyler,Holm ×Justin,Epstein ×Paul,Holm ×Wes,King ×Nate,Levis

mLeadingDelimiter will default to a empty space {''} Creation date: (12/5/2001 2:24:16 AM)

Parameters:
newLeadingDelimiter - char

setOutputAsSingleLine

public void setOutputAsSingleLine(boolean newOutputAsSingleLine)
If true then (i.e. ×Tyler,Holm×Justin,Epstein×Paul,Holm×Wes,King×Nate,Levis The above expample would actually be 5 rows, but all printed in the CSV on a single line **NOTE** mOutputAsSingleLine must be set to true.

If mOutputAsSingleLine is false the above example would look like ×Tyler,Holm ×Justin,Epstein ×Paul,Holm ×Wes,King ×Nate,Levis

mOutputAsSingleLine defaults to false; Creation date: (12/5/2001 2:24:16 AM)

Parameters:
newOutputAsSingleLine - boolean

setWriter

public void setWriter(Writer newWriter)
Sets the writer to write to. If this is null, then the output is returned as one huge String from the CSVHelper; if this isn't null then any generated CSV will be written to the writer and not returned from CSVHelper.