IoTsvWriter

Framework Components [com.onepg.util]

← Back to Class List

Class Information

Package: com.onepg.util

Class Name: IoTsvWriter

Description

TSV writer class for data I/O.
  • Wraps TxtWriter to provide functionality specialized for data I/O TSV output.
  • Simplifies output in TSV format.
  • Outputs column names as the first row of the file.
  • The file encoding is fixed to UTF-8 and the line separator is fixed to LF.
  • Escapes null values.
  • Escapes newline characters (CRLF, CR, LF) and tab characters within values.

Method List

close

public void close()
Closes the file.

println

public void println(String[] values)
Outputs a TSV row (string array).

Parameters

Name Type Description
values String[] value array

println

public void println(IoItems row)
Outputs a TSV row (IoItems).

Parameters

Name Type Description
row IoItems row data

flush

public void flush()
Flushes the output.

getFilePath

public String getFilePath()
Retrieves the file path.

Return Value

String - the file path

getLineCount

public long getLineCount()
Retrieves the number of output rows.

Return Value

long - the number of output rows