Return-Path: X-Original-To: apmail-commons-notifications-archive@minotaur.apache.org Delivered-To: apmail-commons-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94AB317E55 for ; Sun, 19 Apr 2015 16:02:31 +0000 (UTC) Received: (qmail 93651 invoked by uid 500); 19 Apr 2015 16:02:31 -0000 Delivered-To: apmail-commons-notifications-archive@commons.apache.org Received: (qmail 93609 invoked by uid 500); 19 Apr 2015 16:02:31 -0000 Mailing-List: contact notifications-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list notifications@commons.apache.org Received: (qmail 93455 invoked by uid 99); 19 Apr 2015 16:02:31 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Apr 2015 16:02:31 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 394C1AC0E85 for ; Sun, 19 Apr 2015 16:02:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r948234 [6/39] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apidocs/src-html/org/apache/commons/csv/ cobertura/ css/ j... Date: Sun, 19 Apr 2015 16:02:28 -0000 To: notifications@commons.apache.org From: britter@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150419160231.394C1AC0E85@hades.apache.org> Modified: websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVPrinter.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVPrinter.html (original) +++ websites/production/commons/content/proper/commons-csv/apidocs/org/apache/commons/csv/CSVPrinter.html Sun Apr 19 16:02:26 2015 @@ -1,613 +1,563 @@ - - - - - - -CSVPrinter (Apache Commons CSV 1.1 API) - - - - - - - - - - - -
-
org.apache.commons.csv
-

Class CSVPrinter

-
-
- -
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Summary

      - - - - - - - - -
      Constructors 
      Constructor and Description
      CSVPrinter(Appendable out, - CSVFormat format) -
      Creates a printer that will print values to the given stream following the CSVFormat.
      -
      -
    • -
    - - -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CSVPrinter

        -
        public CSVPrinter(Appendable out,
        -                  CSVFormat format)
        -           throws IOException
        -
        Creates a printer that will print values to the given stream following the CSVFormat. -

        - Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats (encapsulation - and escaping with a different character) are not supported. -

        -
        -
        Parameters:
        -
        out - stream to which to print. Must not be null.
        -
        format - the CSV format. Must not be null.
        -
        Throws:
        -
        IOException - thrown if the optional header cannot be printed.
        -
        IllegalArgumentException - thrown if the parameters of the format are inconsistent or if either out or format are null.
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - - - - - - - - - -
        -
      • -

        print

        -
        public void print(Object value)
        -           throws IOException
        -
        Prints the string as the next value on the line. The value will be escaped or encapsulated as needed.
        -
        -
        Parameters:
        -
        value - value to be output.
        -
        Throws:
        -
        IOException - If an I/O error occurs
        -
        -
      • -
      - - - -
        -
      • -

        printComment

        -
        public void printComment(String comment)
        -                  throws IOException
        -
        Prints a comment on a new line among the delimiter separated values. - -

        - Comments will always begin on a new line and occupy a least one full line. The character specified to start - comments and a space will be inserted at the beginning of each new line in the comment. -

        - - If comments are disabled in the current CSV format this method does nothing.
        -
        -
        Parameters:
        -
        comment - the comment to output
        -
        Throws:
        -
        IOException - If an I/O error occurs
        -
        -
      • -
      - - - - - - - -
        -
      • -

        printRecord

        -
        public void printRecord(Iterable<?> values)
        -                 throws IOException
        -
        Prints the given values a single record of delimiter separated values followed by the record separator. - -

        - The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record - separator to the output after printing the record, so there is no need to call println(). -

        -
        -
        Parameters:
        -
        values - values to output.
        -
        Throws:
        -
        IOException - If an I/O error occurs
        -
        -
      • -
      - - - -
        -
      • -

        printRecord

        -
        public void printRecord(Object... values)
        -                 throws IOException
        -
        Prints the given values a single record of delimiter separated values followed by the record separator. - -

        - The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record - separator to the output after printing the record, so there is no need to call println(). -

        -
        -
        Parameters:
        -
        values - values to output.
        -
        Throws:
        -
        IOException - If an I/O error occurs
        -
        -
      • -
      - - - -
        -
      • -

        printRecords

        -
        public void printRecords(Iterable<?> values)
        -                  throws IOException
        -
        Prints all the objects in the given collection handling nested collections/arrays as records. - -

        - If the given collection only contains simple objects, this method will print a single record like - printRecord(Iterable). If the given collections contains nested collections/arrays those nested elements - will each be printed as records using printRecord(Object...). -

        - -

        - Given the following data structure: -

        - -
        - 
        - List<String[]> data = ...
        - data.add(new String[]{ "A", "B", "C" });
        - data.add(new String[]{ "1", "2", "3" });
        - data.add(new String[]{ "A1", "B2", "C3" });
        - 
        - 
        - -

        - Calling this method will print: -

        - -
        - 
        - A, B, C
        - 1, 2, 3
        - A1, B2, C3
        - 
        - 
        -
        -
        Parameters:
        -
        values - the values to print.
        -
        Throws:
        -
        IOException - If an I/O error occurs
        -
        -
      • -
      - - - -
        -
      • -

        printRecords

        -
        public void printRecords(Object... values)
        -                  throws IOException
        -
        Prints all the objects in the given array handling nested collections/arrays as records. - -

        - If the given array only contains simple objects, this method will print a single record like - printRecord(Object...). If the given collections contains nested collections/arrays those nested - elements will each be printed as records using printRecord(Object...). -

        - -

        - Given the following data structure: -

        - -
        - 
        - String[][] data = new String[3][]
        - data[0] = String[]{ "A", "B", "C" };
        - data[1] = new String[]{ "1", "2", "3" };
        - data[2] = new String[]{ "A1", "B2", "C3" };
        - 
        - 
        - -

        - Calling this method will print: -

        - -
        - 
        - A, B, C
        - 1, 2, 3
        - A1, B2, C3
        - 
        - 
        -
        -
        Parameters:
        -
        values - the values to print.
        -
        Throws:
        -
        IOException - If an I/O error occurs
        -
        -
      • -
      - - - - - - - -
        -
      • -

        getOut

        -
        public Appendable getOut()
        -
        Gets the target Appendable.
        -
        -
        Returns:
        -
        the target Appendable.
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - -

Copyright © 2014 The Apache Software Foundation. All rights reserved.

- - + + + + + +CSVPrinter (Apache Commons CSV 1.1.1-SNAPSHOT API) + + + + + + + + + + +
+
org.apache.commons.csv
+

Class CSVPrinter

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      CSVPrinter(Appendable out, + CSVFormat format) +
      Creates a printer that will print values to the given stream following the CSVFormat.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidclose() 
      voidflush() +
      Flushes the underlying stream.
      +
      AppendablegetOut() +
      Gets the target Appendable.
      +
      voidprint(Object value) +
      Prints the string as the next value on the line.
      +
      voidprintComment(String comment) +
      Prints a comment on a new line among the delimiter separated values.
      +
      voidprintln() +
      Outputs the record separator.
      +
      voidprintRecord(Iterable<?> values) +
      Prints the given values a single record of delimiter separated values followed by the record separator.
      +
      voidprintRecord(Object... values) +
      Prints the given values a single record of delimiter separated values followed by the record separator.
      +
      voidprintRecords(Iterable<?> values) +
      Prints all the objects in the given collection handling nested collections/arrays as records.
      +
      voidprintRecords(Object... values) +
      Prints all the objects in the given array handling nested collections/arrays as records.
      +
      voidprintRecords(ResultSet resultSet) +
      Prints all the objects in the given JDBC result set.
      +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CSVPrinter

        +
        public CSVPrinter(Appendable out,
        +          CSVFormat format)
        +           throws IOException
        +
        Creates a printer that will print values to the given stream following the CSVFormat. +

        + Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats (encapsulation + and escaping with a different character) are not supported. +

        +
        Parameters:
        out - stream to which to print. Must not be null.
        format - the CSV format. Must not be null.
        +
        Throws:
        +
        IOException - thrown if the optional header cannot be printed.
        +
        IllegalArgumentException - thrown if the parameters of the format are inconsistent or if either out or format are null.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + + + + + +
        +
      • +

        print

        +
        public void print(Object value)
        +           throws IOException
        +
        Prints the string as the next value on the line. The value will be escaped or encapsulated as needed.
        +
        Parameters:
        value - value to be output.
        +
        Throws:
        +
        IOException - If an I/O error occurs
        +
      • +
      + + + +
        +
      • +

        printComment

        +
        public void printComment(String comment)
        +                  throws IOException
        +
        Prints a comment on a new line among the delimiter separated values. + +

        + Comments will always begin on a new line and occupy a least one full line. The character specified to start + comments and a space will be inserted at the beginning of each new line in the comment. +

        + + If comments are disabled in the current CSV format this method does nothing.
        +
        Parameters:
        comment - the comment to output
        +
        Throws:
        +
        IOException - If an I/O error occurs
        +
      • +
      + + + + + + + +
        +
      • +

        printRecord

        +
        public void printRecord(Iterable<?> values)
        +                 throws IOException
        +
        Prints the given values a single record of delimiter separated values followed by the record separator. + +

        + The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record + separator to the output after printing the record, so there is no need to call println(). +

        +
        Parameters:
        values - values to output.
        +
        Throws:
        +
        IOException - If an I/O error occurs
        +
      • +
      + + + +
        +
      • +

        printRecord

        +
        public void printRecord(Object... values)
        +                 throws IOException
        +
        Prints the given values a single record of delimiter separated values followed by the record separator. + +

        + The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record + separator to the output after printing the record, so there is no need to call println(). +

        +
        Parameters:
        values - values to output.
        +
        Throws:
        +
        IOException - If an I/O error occurs
        +
      • +
      + + + +
        +
      • +

        printRecords

        +
        public void printRecords(Iterable<?> values)
        +                  throws IOException
        +
        Prints all the objects in the given collection handling nested collections/arrays as records. + +

        + If the given collection only contains simple objects, this method will print a single record like + printRecord(Iterable). If the given collections contains nested collections/arrays those nested elements + will each be printed as records using printRecord(Object...). +

        + +

        + Given the following data structure: +

        + +
        + 
        + List<String[]> data = ...
        + data.add(new String[]{ "A", "B", "C" });
        + data.add(new String[]{ "1", "2", "3" });
        + data.add(new String[]{ "A1", "B2", "C3" });
        + 
        + 
        + +

        + Calling this method will print: +

        + +
        + 
        + A, B, C
        + 1, 2, 3
        + A1, B2, C3
        + 
        + 
        +
        Parameters:
        values - the values to print.
        +
        Throws:
        +
        IOException - If an I/O error occurs
        +
      • +
      + + + +
        +
      • +

        printRecords

        +
        public void printRecords(Object... values)
        +                  throws IOException
        +
        Prints all the objects in the given array handling nested collections/arrays as records. + +

        + If the given array only contains simple objects, this method will print a single record like + printRecord(Object...). If the given collections contains nested collections/arrays those nested + elements will each be printed as records using printRecord(Object...). +

        + +

        + Given the following data structure: +

        + +
        + 
        + String[][] data = new String[3][]
        + data[0] = String[]{ "A", "B", "C" };
        + data[1] = new String[]{ "1", "2", "3" };
        + data[2] = new String[]{ "A1", "B2", "C3" };
        + 
        + 
        + +

        + Calling this method will print: +

        + +
        + 
        + A, B, C
        + 1, 2, 3
        + A1, B2, C3
        + 
        + 
        +
        Parameters:
        values - the values to print.
        +
        Throws:
        +
        IOException - If an I/O error occurs
        +
      • +
      + + + + + + + +
        +
      • +

        getOut

        +
        public Appendable getOut()
        +
        Gets the target Appendable.
        +
        Returns:
        the target Appendable.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2015 The Apache Software Foundation. All rights reserved.

+ + \ No newline at end of file