com.microfocus.awm.zos.util

## Class CSVExporter

- java.lang.Object
- - com.microfocus.awm.zos.util.CSVExporter

-     public class CSVExporter
      extends java.lang.Object

  Utility class to convert objects into CSV format.
  Author:
    Ralf Pakosch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CSVExporter()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `toCSVString(java.lang.String[] pHeaders, java.util.List<java.lang.String[]> pValues)` Converts the given headers and values into a CSV string.
    `static java.lang.String` | `toCSVString(java.lang.String[] pHeaders, java.lang.String[][] pValues)` Converts the given headers and values into a CSV string.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CSVExporter

          public CSVExporter()

  - ### Method Detail

    - #### toCSVString

          public static java.lang.String toCSVString(java.lang.String[] pHeaders,
                                                     java.lang.String[][] pValues)

      Converts the given headers and values into a CSV string. The length of the header array and every second dimension of the values array must be equal to another.
      Parameters:
        `pHeaders` - the headers
        `pValues` - the values: `[line][values]`
      Returns:
        the headers and values in CSV format
      Throws:
        `java.lang.IllegalArgumentException` - if the length of headers and all value arrays is not equal.

    - #### toCSVString

          public static java.lang.String toCSVString(java.lang.String[] pHeaders,
                                                     java.util.List<java.lang.String[]> pValues)

      Converts the given headers and values into a CSV string. The length of the header array and every values array of the given list must be equal to another.
      Parameters:
        `pHeaders` - the headers
        `pValues` - the values. Each string array represents a value line.
      Returns:
        the headers and values in CSV format
      Throws:
        `java.lang.IllegalArgumentException` - if the length of headers and all value arrays is not equal.

Copyright © 2015 Micro Focus GmbH. All rights reserved.