OpenAPI 1.0

com.aquafold.openapi.io
Interface AQTextProcessor

All Superinterfaces:
Closeable
All Known Subinterfaces:
AQTextFileReader, AQTextFileWriter, AQTextStringReader, AQTextStringWriter

public interface AQTextProcessor
extends Closeable

Provides basic accessor methods for formatting delimited text readers and writers.


Method Summary
 void setCellDelimiter(String delimiter)
          Sets cell delimiter character.
 void setCloseDateQuoteIdentifier(String quoteIdentifier)
          Sets closing quote identifier for Date and/or Time.
 void setColumnWidth(int column, int width)
          Set fixed column width.
 void setDateFormat(int column, String spec)
          Sets Date and/or Time format for the specified column, using the platform locale.
 void setDateFormat(int column, String spec, Object locale)
          Sets Date and/or Time format for the specified column, using the locale provided.
 void setDateQuoteIdentifier(String quoteIdentifier)
          Sets quote identifier for Date and/or Time.
 void setFirstLineContainsColumnNames(boolean on)
          Sets whether the input or output file contains column names in the first row.
 void setNullString(int column, String nullString)
          Sets a string to be printed if the data in the specified column is null.
 void setNumberFormat(int column)
          Sets number format for the specified column, using the platform locale.
 void setNumberFormat(int column, Object locale)
          Sets number format for the specified column, using the locale provided.
 void setOpenDateQuoteIdentifier(String quoteIdentifier)
          Sets opening quote identifier for Date and/or Time.
 void setQuoteIdentifier(int column, String quote)
          Sets the quote identifier for the specified column.
 void setQuoteIdentifier(String quoteIdentifier)
          Sets default quote identifier.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

setDateFormat

void setDateFormat(int column,
                   String spec)
Sets Date and/or Time format for the specified column, using the platform locale. This method can be used for formatting of date, time, or datetime columns.

Parameters:
column - Column index.
spec - Format specification as defined by SimpleDateFormat.

setDateFormat

void setDateFormat(int column,
                   String spec,
                   Object locale)
Sets Date and/or Time format for the specified column, using the locale provided. This method can be used for formatting of date, time, or datetime columns.

Parameters:
column - Column index.
spec - Format specification as defined by SimpleDateFormat.
locale - Locale code of Locale object.

setNumberFormat

void setNumberFormat(int column)
Sets number format for the specified column, using the platform locale.

Parameters:
column - Column index.

setNumberFormat

void setNumberFormat(int column,
                     Object locale)
Sets number format for the specified column, using the locale provided.

Parameters:
column - Column index.
locale - Locale code of Locale object.

setColumnWidth

void setColumnWidth(int column,
                    int width)
Set fixed column width.

Parameters:
column - Column index.
width - Column width in characters.

setCellDelimiter

void setCellDelimiter(String delimiter)
Sets cell delimiter character. The default value for delimiter is null.

Parameters:
delimiter -

setQuoteIdentifier

void setQuoteIdentifier(String quoteIdentifier)
Sets default quote identifier.

Parameters:
quoteIdentifier - Quote identifier string (only the first character specifies the quote identifier character).

setQuoteIdentifier

void setQuoteIdentifier(int column,
                        String quote)
Sets the quote identifier for the specified column.

Parameters:
column - Column index.
quote - Quote identifier string (only the first character specifies the quote identifier character).

setDateQuoteIdentifier

void setDateQuoteIdentifier(String quoteIdentifier)
Sets quote identifier for Date and/or Time. This identifier is used as both opening quote identifier and closing quote identifier. If the opening quote identifier and the closing quote identifier are different, setOpenDateQuoteIdentifier(String quoteIdentifier) and setCloseDateQuoteIdentifier(String quoteIdentifier) should be used.

Parameters:
quoteIdentifier - Quote identifier string

setOpenDateQuoteIdentifier

void setOpenDateQuoteIdentifier(String quoteIdentifier)
Sets opening quote identifier for Date and/or Time.

Parameters:
quoteIdentifier - Quote identifier string

setCloseDateQuoteIdentifier

void setCloseDateQuoteIdentifier(String quoteIdentifier)
Sets closing quote identifier for Date and/or Time.

Parameters:
quoteIdentifier - Quote identifier string

setNullString

void setNullString(int column,
                   String nullString)
Sets a string to be printed if the data in the specified column is null.

Parameters:
column - Column index.
nullString -

setFirstLineContainsColumnNames

void setFirstLineContainsColumnNames(boolean on)
Sets whether the input or output file contains column names in the first row. This method must be called before the first read or write operation.

Parameters:
on -

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.