de.esprit.appsuite.database.io

## Class DBOUnlWriter

- java.lang.Object
- - de.esprit.appsuite.database.io.DBOUnlWriter

-     public class DBOUnlWriter
      extends java.lang.Object

  This class writes the data of DBObject instances to a stream in UNL format. The UNL format is just a simple ASCII format where field values are separated by a special character (by default '|').
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBOUnlWriter(java.io.File file)`
    `DBOUnlWriter(java.io.OutputStream out)`
    `DBOUnlWriter(java.io.PrintWriter pw)`
    `DBOUnlWriter(java.lang.String fileName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the outputstream
    `char` | `getFieldSeparator()`
    `java.io.File` | `getFile()` Returns the file the data was written to.
    `int` | `getRecordCount()` Returns the number of record that have been successfully written
    `void` | `setFieldSeparator(char fs)` Set the special character for field separation (default is '|')
    `void` | `setVerbose(boolean isVerbose)`
    `void` | `writeRecord(DBRecord record)`
    `void` | `writeRecords(DBRecord[] record)`
    `void` | `writeRecords(RecordIterator it)`

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

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

- - ### Constructor Detail

    - #### DBOUnlWriter

          public DBOUnlWriter(java.lang.String fileName)
                       throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### DBOUnlWriter

          public DBOUnlWriter(java.io.File file)
                       throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

    - #### DBOUnlWriter

          public DBOUnlWriter(java.io.OutputStream out)

    - #### DBOUnlWriter

          public DBOUnlWriter(java.io.PrintWriter pw)

  - ### Method Detail

    - #### writeRecords

          public void writeRecords(RecordIterator it)
                            throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### writeRecords

          public void writeRecords(DBRecord[] record)

    - #### writeRecord

          public void writeRecord(DBRecord record)

    - #### getRecordCount

          public int getRecordCount()

      Returns the number of record that have been successfully written

    - #### getFile

          public java.io.File getFile()

      Returns the file the data was written to. May be null if no file was used as output.

    - #### close

          public void close()

      Closes the outputstream

    - #### setVerbose

          public void setVerbose(boolean isVerbose)

    - #### setFieldSeparator

          public void setFieldSeparator(char fs)

      Set the special character for field separation (default is '|')

    - #### getFieldSeparator

          public char getFieldSeparator()

Copyright © 2014 EsprIT-Systems. All Rights Reserved.