public class DataFrameWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
static WriteFormat |
DEFAULT_PRINT_FORMAT
Defines the default format used to print dataframes.
|
static WriteFormat |
DEFAULT_WRITE_FORMAT
Defines the default format used to write dataframes.
|
static boolean |
DEFAULT_WRITE_META
Defines whether meta files should be written per default.
|
| Constructor and Description |
|---|
DataFrameWriter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
print(DataFrame dataFrame)
Prints a dataframe to
System.out using the default print format (DEFAULT_WRITE_FORMAT). |
static void |
print(DataFrame dataFrame,
DataWriter dataWriter)
Prints a dataframe to
System.out using a specified DataWriter. |
static void |
print(DataFrame dataFrame,
WriteFormat writeFormat)
Prints a dataframe to
System.out using a specified WriteFormat. |
static void |
write(File file,
DataFrame dataFrame)
Writes a dataframe to a file using the default write format (
DEFAULT_WRITE_FORMAT). |
static void |
write(File file,
DataFrame dataFrame,
boolean writeMetaFile)
Writes a dataframe to a file using the default write format (
DEFAULT_WRITE_FORMAT). |
static void |
write(File file,
DataFrame dataFrame,
DataWriter dataWriter)
Writes a dataframe to a file using a specified
DataWriter. |
static void |
write(File file,
DataFrame dataFrame,
DataWriter dataWriter,
boolean writeMetaFile)
Writes a dataframe to a file using a specified
DataWriter. |
static void |
write(File file,
DataFrame dataFrame,
WriteFormat writeFormat)
Writes a dataframe to a file using a specified
WriteFormat. |
static void |
write(File file,
DataFrame dataFrame,
WriteFormat writeFormat,
boolean writeMetaFile)
Writes a dataframe to a file using a specified
WriteFormat. |
static void |
write(OutputStream outputStream,
DataFrame dataFrame)
Writes a dataframe to a
OutputStream using the default write format (DEFAULT_WRITE_FORMAT). |
static void |
write(OutputStream outputStream,
DataFrame dataFrame,
DataWriter dataWriter)
Writes a dataframe to a
OutputStream using a specified DataWriter. |
static void |
write(OutputStream outputStream,
DataFrame dataFrame,
WriteFormat writeFormat)
Writes a dataframe to a
OutputStream using a specified WriteFormat. |
static void |
write(Writer writer,
DataFrame dataFrame)
Writes a dataframe to a
Writer using the default write format (DEFAULT_WRITE_FORMAT). |
static void |
write(Writer writer,
DataFrame dataFrame,
DataWriter dataWriter)
Writes a dataframe to a
Writer using a specified DataWriter. |
static void |
write(Writer writer,
DataFrame dataFrame,
WriteFormat writeFormat)
Writes a dataframe to a
Writer using a specified WriteFormat. |
static void |
writeCSV(File file,
DataFrame dataFrame,
char separator,
boolean writeHeader)
Writes a dataframe to a file using the CSV file format (
CSVFormat) and a specified separator. |
static void |
writeCSV(File file,
DataFrame dataFrame,
char separator,
boolean writeHeader,
boolean writeMetaFile)
Writes a dataframe to a file using the CSV file format (
CSVFormat) and a specified separator. |
static void |
writeCSV(File file,
DataFrame dataFrame,
char separator,
String headerPrefix)
Writes a dataframe to a file using the CSV file format (
CSVFormat) and a specified separator. |
static void |
writeCSV(File file,
DataFrame dataFrame,
char separator,
String headerPrefix,
boolean writeMetaFile)
Writes a dataframe to a file using the CSV file format (
CSVFormat) and a specified separator. |
static void |
writeCSV(OutputStream outputStream,
DataFrame dataFrame,
char separator,
boolean writeHeader)
Writes a dataframe to a
OutputStream using the CSV file format (CSVFormat) and a specified separator. |
static void |
writeCSV(OutputStream outputStream,
DataFrame dataFrame,
char separator,
String headerPrefix)
Writes a dataframe to a
OutputStream using the CSV file format (CSVFormat) and a specified separator. |
static void |
writeCSV(Writer writer,
DataFrame dataFrame,
char separator,
boolean writeHeader)
|
static void |
writeCSV(Writer writer,
DataFrame dataFrame,
char separator,
String headerPrefix)
|
static void |
writeMetaFile(File file,
DataFrame dataFrame,
DataWriter dataWriter)
Writes the meta file for a dataframe and
DataWriter to a target file |
public static final boolean DEFAULT_WRITE_META
DataWriter
used to write the DataFrame has a matching ReadFormat (DataWriter.getReadFormat()).public static final WriteFormat DEFAULT_PRINT_FORMAT
public static final WriteFormat DEFAULT_WRITE_FORMAT
public static void write(File file, DataFrame dataFrame, DataWriter dataWriter)
DataWriter.
If there is a matching DataReader for the DataWriter, a meta file is written automaticallyfile - target filedataFrame - input dataframedataWriter - data writer used to write the dataframepublic static void write(File file, DataFrame dataFrame, DataWriter dataWriter, boolean writeMetaFile)
DataWriter.
If there is a matching ReadFormat for the DataWriter, a meta file is written if specified.file - target filedataFrame - input dataframewriteMetaFile - defines whether a meta file should be createddataWriter - data writer used to write the dataframepublic static void write(Writer writer, DataFrame dataFrame, DataWriter dataWriter)
Writer using a specified DataWriter.writer - target writerdataFrame - input dataframedataWriter - data writer used to write the dataframepublic static void write(OutputStream outputStream, DataFrame dataFrame, DataWriter dataWriter)
OutputStream using a specified DataWriter.outputStream - target OutputStreamdataFrame - input dataframedataWriter - data writer used to write the dataframepublic static void write(File file, DataFrame dataFrame, WriteFormat writeFormat)
WriteFormat.
If there is a matching ReadFormat for the WriteFormat, a meta file is written automaticallyfile - target filedataFrame - input dataframewriteFormat - defines the output format used to write the dataframepublic static void write(File file, DataFrame dataFrame, WriteFormat writeFormat, boolean writeMetaFile)
WriteFormat.
If there is a matching ReadFormat for the WriteFormat, a meta file is written if specifiedfile - target filedataFrame - input dataframewriteFormat - defines the output format used to write the dataframewriteMetaFile - defines whether a meta file should be createdpublic static void write(Writer writer, DataFrame dataFrame, WriteFormat writeFormat)
Writer using a specified WriteFormat.writer - target writerdataFrame - input dataframewriteFormat - data writer used to write the dataframepublic static void write(OutputStream outputStream, DataFrame dataFrame, WriteFormat writeFormat)
OutputStream using a specified WriteFormat.outputStream - target OutputStreamdataFrame - input dataframewriteFormat - data writer used to write the dataframepublic static void write(File file, DataFrame dataFrame)
DEFAULT_WRITE_FORMAT).
A meta file is written automatically.file - target filedataFrame - input dataframepublic static void write(File file, DataFrame dataFrame, boolean writeMetaFile)
DEFAULT_WRITE_FORMAT).
A meta file is written if specified.file - target filedataFrame - input dataframewriteMetaFile - defines whether a meta file should be createdpublic static void write(Writer writer, DataFrame dataFrame)
Writer using the default write format (DEFAULT_WRITE_FORMAT).writer - target writerdataFrame - input dataframepublic static void write(OutputStream outputStream, DataFrame dataFrame)
OutputStream using the default write format (DEFAULT_WRITE_FORMAT).outputStream - target outputStreamdataFrame - input dataframepublic static void writeCSV(File file, DataFrame dataFrame, char separator, boolean writeHeader)
CSVFormat) and a specified separator.
A header is written if specified.
A meta file is written automatically.file - target fileseparator - separator charwriteHeader - defines whether the header should be written to the filedataFrame - input dataframepublic static void writeCSV(File file, DataFrame dataFrame, char separator, boolean writeHeader, boolean writeMetaFile)
CSVFormat) and a specified separator.
Header and meta file are written if specified.file - target fileseparator - separator charwriteHeader - defines whether the header should be written to the filewriteMetaFile - defines whether a meta file should be writtendataFrame - input dataframepublic static void writeCSV(Writer writer, DataFrame dataFrame, char separator, boolean writeHeader)
Writer using the CSV file format (CSVFormat) and a specified separator.
Header and meta file are written if specified.writer - target writerseparator - separator charwriteHeader - defines whether the header should be written to the filedataFrame - input dataframepublic static void writeCSV(OutputStream outputStream, DataFrame dataFrame, char separator, boolean writeHeader)
OutputStream using the CSV file format (CSVFormat) and a specified separator.
Header and meta file are written if specified.outputStream - target OutputStreamseparator - separator charwriteHeader - defines whether the header should be written to the filedataFrame - input dataframepublic static void writeCSV(File file, DataFrame dataFrame, char separator, String headerPrefix)
CSVFormat) and a specified separator.
Header is written and a header prefix is added.
A meta file is written automatically.file - target fileseparator - separator charheaderPrefix - header prefixdataFrame - input dataframepublic static void writeCSV(File file, DataFrame dataFrame, char separator, String headerPrefix, boolean writeMetaFile)
CSVFormat) and a specified separator.
Header is written and a header prefix is added.
A meta file is written if specified.file - target fileseparator - separator charheaderPrefix - header prefixwriteMetaFile - defines whether a meta file should be writtendataFrame - input dataframepublic static void writeCSV(Writer writer, DataFrame dataFrame, char separator, String headerPrefix)
Writer using the CSV file format (CSVFormat) and a specified separator.
Header is written and a header prefix is added.writer - target writerseparator - separator charheaderPrefix - header prefixdataFrame - input dataframepublic static void writeCSV(OutputStream outputStream, DataFrame dataFrame, char separator, String headerPrefix)
OutputStream using the CSV file format (CSVFormat) and a specified separator.
Header is written and a header prefix is added.outputStream - target OutputStreamseparator - separator charheaderPrefix - header prefixdataFrame - input dataframepublic static void writeMetaFile(File file, DataFrame dataFrame, DataWriter dataWriter)
DataWriter to a target filefile - target filedataFrame - input dataframedataWriter - DataWriter used to write the dataframepublic static void print(DataFrame dataFrame)
System.out using the default print format (DEFAULT_WRITE_FORMAT).dataFrame - input dataframepublic static void print(DataFrame dataFrame, DataWriter dataWriter)
System.out using a specified DataWriter.dataWriter - data writer used to print the dataframedataFrame - input dataframepublic static void print(DataFrame dataFrame, WriteFormat writeFormat)
System.out using a specified WriteFormat.writeFormat - write format used to print the dataframedataFrame - input dataframeCopyright © 2020. All rights reserved.