Builder for convenient
configuration of the export functionality. Note that most scenarios for customizing output data can be handled by
implementing a custom ExportFilter.
| Modifier and Type | Class and Description |
|---|---|
| public static class | ExportUtil.
Builder which simplifies configuration of an export operation. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final char |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | |
| public static void | exportAll(Database
Database the table to export belongs to db, File The directory where the new files will be created dir, String The file extension of the new files ext, boolean If header)true the first line contains the column namesCopy all tables into new delimited text files
Equivalent to: |
| public static void | exportAll(Database
Database the table to export belongs to db, File The directory where the new files will be created dir, String The file extension of the new files ext, boolean If header, String true the first line contains the column namesThe column delimiter, delim, char null for default (comma)The quote character quote, ExportFilter valid export filter filter)Copy all tables into new delimited text files
Equivalent to: |
| public static void | exportFile(Database
Database the table to export belongs to db, String Name of the table to export tableName, File New file to create f)Copy a table into a new delimited text file
Equivalent to: |
| public static void | exportFile(Database
Database the table to export belongs to db, String Name of the table to export tableName, File New file to create f, boolean If header, String true the first line contains the column namesThe column delimiter, delim, char null for default (comma)The quote character quote, ExportFilter valid export filter filter)Copy a table into a new delimited text file
Nearly equivalent to: |
| public static void | exportWriter(Database
Database the table to export belongs to db, String Name of the table to export tableName, BufferedWriter Writer to export to out)Copy a table in this database into a new delimited text file
Equivalent to: |
| public static void | exportWriter(Database
Database the table to export belongs to db, String Name of the table to export tableName, BufferedWriter Writer to export to out, boolean If header, String true the first line contains the column namesThe column delimiter, delim, char null for default (comma)The quote character quote, ExportFilter valid export filter filter)Copy a table in this database into a new delimited text file. |
| public static void | exportWriter(Cursor
Cursor to export cursor, BufferedWriter Writer to export to out, boolean If header, String true the first line contains the column namesThe column delimiter, delim, char null for default (comma)The quote character quote, ExportFilter valid export filter filter)Copy a table in this database into a new delimited text file. |
| private static void |
| DEFAULT_DELIMITER | back to summary |
|---|---|
| public static final String DEFAULT_DELIMITER | |
| DEFAULT_FILE_EXT | back to summary |
|---|---|
| public static final String DEFAULT_FILE_EXT | |
| DEFAULT_QUOTE_CHAR | back to summary |
|---|---|
| public static final char DEFAULT_QUOTE_CHAR | |
| ExportUtil | back to summary |
|---|---|
| private ExportUtil() | |
| exportAll | back to summary |
|---|---|
| public static void exportAll(Database db, File dir) throws IOException Copy all tables into new delimited text files
| |
| exportAll | back to summary |
|---|---|
| public static void exportAll(Database db, File dir, String ext) throws IOException Copy all tables into new delimited text files
| |
| exportAll | back to summary |
|---|---|
| public static void exportAll(Database db, File dir, String ext, boolean header) throws IOException Copy all tables into new delimited text files
| |
| exportAll | back to summary |
|---|---|
| public static void exportAll(Database db, File dir, String ext, boolean header, String delim, char quote, ExportFilter filter) throws IOException Copy all tables into new delimited text files
| |
| exportFile | back to summary |
|---|---|
| public static void exportFile(Database db, String tableName, File f) throws IOException Copy a table into a new delimited text file
| |
| exportFile | back to summary |
|---|---|
| public static void exportFile(Database db, String tableName, File f, boolean header, String delim, char quote, ExportFilter filter) throws IOException Copy a table into a new delimited text file
| |
| exportWriter | back to summary |
|---|---|
| public static void exportWriter(Database db, String tableName, BufferedWriter out) throws IOException Copy a table in this database into a new delimited text file
| |
| exportWriter | back to summary |
|---|---|
| public static void exportWriter(Database db, String tableName, BufferedWriter out, boolean header, String delim, char quote, ExportFilter filter) throws IOException Copy a table in this database into a new delimited text file.
| |
| exportWriter | back to summary |
|---|---|
| public static void exportWriter(Cursor cursor, BufferedWriter out, boolean header, String delim, char quote, ExportFilter filter) throws IOException Copy a table in this database into a new delimited text file.
| |
| writeValue | back to summary |
|---|---|
| private static void writeValue(BufferedWriter out, String value, char quote, Pattern needsQuotePattern) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private Cursor | |
| private Database | |
| private String | |
| private String | |
| private ExportFilter | |
| private boolean | |
| private char | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | exportWriter(BufferedWriter writer)
Exports the table or cursor to the given writer, using the settings of this builder. |
| public ExportUtil. | |
| public ExportUtil. | |
| public ExportUtil. | |
| public ExportUtil. | |
| public ExportUtil. | |
| public ExportUtil. | |
| public ExportUtil. | |
| public ExportUtil. |
| mcursor | back to summary |
|---|---|
| private Cursor mcursor | |
| mdb | back to summary |
|---|---|
| private Database mdb | |
| mdelim | back to summary |
|---|---|
| private String mdelim | |
| mext | back to summary |
|---|---|
| private String mext | |
| mfilter | back to summary |
|---|---|
| private ExportFilter mfilter | |
| mheader | back to summary |
|---|---|
| private boolean mheader | |
| mquote | back to summary |
|---|---|
| private char mquote | |
| mtableName | back to summary |
|---|---|
| private String mtableName | |
| Builder | back to summary |
|---|---|
| public Builder(Database _db) | |
| Builder | back to summary |
|---|---|
| public Builder(Database _db, String _tableName) | |
| Builder | back to summary |
|---|---|
| public Builder(Cursor _cursor) | |
| exportAll | back to summary |
|---|---|
| public void exportAll(File dir) throws IOException Exports all tables of the database to the given directory, using the settings of this builder. | |
| exportFile | back to summary |
|---|---|
| public void exportFile(File f) throws IOException Exports the table to the given file, using the settings of this builder. | |
| exportWriter | back to summary |
|---|---|
| public void exportWriter(BufferedWriter writer) throws IOException Exports the table or cursor to the given writer, using the settings of this builder. | |
| withCursor | back to summary |
|---|---|
| public ExportUtil. | |
| withDatabase | back to summary |
|---|---|
| public ExportUtil. | |
| withDelimiter | back to summary |
|---|---|
| public ExportUtil. | |
| withFileNameExtension | back to summary |
|---|---|
| public ExportUtil. | |
| withFilter | back to summary |
|---|---|
| public ExportUtil. | |
| withHeader | back to summary |
|---|---|
| public ExportUtil. | |
| withQuote | back to summary |
|---|---|
| public ExportUtil. | |
| withTableName | back to summary |
|---|---|
| public ExportUtil. | |