de.esprit.appsuite.nio.ndf

## Class NdfWriter<C extends ApplicationContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.task.AbstractAsyncExecutable<C>
      - - de.esprit.appsuite.nio.ndf.NdfWriter<C>

- All Implemented Interfaces:
    ApplicationObject<C>, NdfConstants, AsyncExecutable<C>, CancellableTask, TaskMonitorSupport, SimpleLogSupport, Dumpable, Executable, java.io.Closeable, java.lang.AutoCloseable
  Direct Known Subclasses:
    AppLaunchPrefsWriter, BatchTaskConfigWriter, CredentialWriter, DatabaseConfigWriter, DBOWriter, GroupMemberWriter, GroupWriter, JavaAppDescriptorWriter, NetworkConfigWriter, PermissionConfigWriter, TimestampWriter, UserWriter

      public abstract class NdfWriter<C extends ApplicationContext>
      extends AbstractAsyncExecutable<C>
      implements NdfConstants, java.io.Closeable

  This writer supports writing output data in the Neutral Data Format (NDF). It allows for convenient writing of all data structures defined in NDF.
  The main structures supported are:
  - Comments
  - Properties
  - Objects
  - Tables
  - Arrays
  Note that subclasses must implement `performWrite()` in order to write the NDF data.
  Author:
    Rainer Buesch

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `char` | `defaultBlockCommentFillChar`
    `char` | `defaultLineCommentFillChar`
    `static NdfTable.Alignment` | `LEFT`
    `static NdfTable.Alignment` | `RIGHT`

    - ### Fields inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `childTaskRef, isTestMode, monitorController, resultRef, stateFlag`

    - ### Fields inherited from interface de.esprit.appsuite.nio.ndf.NdfConstants

      `allowedInNames, blockCommentChar, booleanFalseChar, booleanFalseLiteral, booleanTrueChar, booleanTrueLiteral, currentNdfDocVersion, defaultTextEndChar, defaultTextParagraphChar, lineCommentChar, ndfDocAuthorKey, ndfDocCreatedKey, ndfDocEncodingKey, ndfDocTypeKey, ndfDocVersionKey, nullLiteral, quotingBreakCodes, standardBreakCodes, structureChar, textValueBreakCodes, validTextBreakSymbols`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NdfWriter(C ctx, java.io.ByteArrayOutputStream stream)`
    `NdfWriter(C ctx, java.io.ByteArrayOutputStream stream, boolean isAppendMode)`
    `NdfWriter(C ctx, java.io.ByteArrayOutputStream stream, int buffSize)`
    `NdfWriter(C ctx, java.io.File file)`
    `NdfWriter(C ctx, java.io.File file, boolean isAppendMode)`
    `NdfWriter(C ctx, FileInfo fileInfo, java.io.OutputStream stream)`
    `NdfWriter(C ctx, FileInfo fileInfo, java.io.OutputStream stream, int buffSize)`
    `NdfWriter(C ctx, java.io.File file, int buffSize)`
    `NdfWriter(C ctx, java.io.File file, int buffSize, boolean isAppendMode)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the output file.
    `void` | `closeArray()` Closes the ARRAY structure.
    `void` | `closeBlockComment()` Closes the comment block by inserting a titled separator-headline ending with the block-comment-char '$'.
    `void` | `closeBlockComment(java.lang.String title)` Closes the comment block by inserting a titled separator-headline ending with the block-comment-char '$'.
    `void` | `closeDocument()` Closes the document.
    `void` | `closeList()` Closes a LIST structure.
    `void` | `closeObject()` Opens an OBJECT structure.
    `void` | `closePropertyList()` Closes a property-list by writing the '>' char.
    `void` | `closeStructuredArrayProperty()`
    `void` | `closeStructuredObjectProperty()`
    `void` | `closeStructuredTableProperty()`
    `void` | `closeTable()` Closes a TABLE structure.
    `void` | `closeText()` Closes a TEXT structure.
    `void` | `executeAsync()` Contains the code to be executed asynchronously.
    `void` | `flush()`
    `java.lang.String` | `getEncoding()` Returns the character encoding being used, null if not set.
    `java.io.File` | `getOutputFile()`
    `long` | `getWriteDuration()`
    `boolean` | `isWriteBodyTextRaw()` Tells whether body text is written in raw mode - just as it is.
    `void` | `openArray(java.lang.String name, int... dimensions)` Opens an ARRAY structure.
    `void` | `openArray(java.lang.String name, NdfProperties props, int... dimensions)` Opens an ARRAY structure.
    `void` | `openBlockComment(int headerWidth, java.lang.String title)`
    `void` | `openBlockComment(java.lang.String title)` Opens the comment block by inserting the block-comment-char '$' and a titled separator-headline.
    `void` | `openDocument()` Writes the mandatory document header properties.
    `void` | `openDocument(NdfProperties userProps)` Writes the mandatory document header properties.
    `void` | `openList(java.lang.String listName)` Opens a LIST structure by writing the structure-key and the listName.
    `void` | `openList(java.lang.String listName, NdfProperties props)`
    `void` | `openObject(java.lang.String name)` Opens an OBJECT structure by writing the structure-key and the objectName.
    `void` | `openObject(java.lang.String name, NdfProperties props)`
    `void` | `openOutput()` Opens the output file.
    `void` | `openPropertyList()` Opens a property-list by writing the '<' char.
    `void` | `openStructuredArrayProperty(java.lang.String propertyKey, java.lang.String arrayName, int... dimensions)` Writes a property who's value is an ARRAY structure.
    `void` | `openStructuredObjectProperty(java.lang.String propertyKey, java.lang.String objectName)` Writes a property who's value is an OBJECT structure.
    `void` | `openStructuredTableProperty(java.lang.String propertyKey, NdfTable header)` Writes a property who's value is a TABLE structure.
    `void` | `openStructuredTableProperty(java.lang.String propertyKey, NdfTable header, NdfProperties props)`
    `void` | `openTable(NdfTable header)` Opens a TABLE structure by writing the structure-key, the tableName and the column-headers.
    `void` | `openTable(NdfTable header, NdfProperties props)`
    `void` | `openText(java.lang.String name)` Opens a TEXT structure.
    `void` | `openText(java.lang.String name, char endChar)`
    `void` | `openText(java.lang.String name, char paragraphChar, char endChar)`
    `void` | `openText(java.lang.String name, NdfProperties props)`
    `void` | `openText(java.lang.String name, NdfProperties props, char endChar)`
    `void` | `openText(java.lang.String name, NdfProperties props, char endChar, char paragraphChar)`
    `protected abstract void` | `performWrite()` This method does the actual write of data.
    `void` | `setAppendMode(boolean isAppendMode)`
    `void` | `setArrayValuesTabbed(boolean isTabbed)` If true, then a TAB character is used as array value separator.
    `void` | `setDecimalFormat(java.text.DecimalFormat format)` Defines the format for writing decimal array values
    `void` | `setDefaultCommentHeaderLength(int length)` Defines the default length of a comment header for both block and line comments.
    `void` | `setEncoding(java.lang.String encoding)` Defines the character encoding to be used.
    `void` | `setFillCharForBlockCommentHeader(char fillChar)` Defines the fill char for block-comment header- and footer-lines.
    `void` | `setFillCharForLineCommentHeader(char fillChar)` Defines the fill char for line comment headers.
    `void` | `setFixedCreationTimestamp(DBTimestamp timestamp)` Enforces the given timestamp to be taken written as the creation time.
    `void` | `setLogChannel(LogChannel logCh)`
    `void` | `setMaxArrayValuesByLine(int maxValues)` Sets the maximum number of array values written into one line.
    `void` | `setMaxListValuesByLine(int maxValues)` Sets the maximum number of list values written into one line.
    `void` | `setPropertiesAligned(boolean isAligned)` Causes properties to be written aligned based on their maximum key size.
    `void` | `setPropertiesCompacted(boolean isSingleLine)` Causes properties to be written into a single line.
    `void` | `setPropertiesIndented(boolean isIndented)` Causes properties to get an indentation.
    `void` | `setTableValuesTabbed(boolean isTabbed)` If true, then a TAB character is used as table value separator.
    `void` | `setUseObjectShortCut(boolean useShortCut)`
    `void` | `setWriteBodyTextRaw(boolean isRaw)` Switches off body text optimization which speeds up writing.
    `void` | `writeArrayValue(java.lang.Object value)` Writes a single array value.
    `void` | `writeArrayValues(java.util.Collection<?> values)`
    `void` | `writeArrayValues(double[] values)`
    `void` | `writeArrayValues(float[] values)`
    `void` | `writeArrayValues(int[] values)`
    `void` | `writeArrayValues(long[] values)`
    `void` | `writeArrayValues(java.lang.Object... values)` Writes array values.
    `void` | `writeArrayValues(short[] values)`
    `void` | `writeArrayValues(java.lang.String[] values)`
    `void` | `writeBlockComment(int headerWidth, java.util.List<java.lang.String> lines)`
    `void` | `writeBlockComment(int headerWidth, java.lang.String text)`
    `void` | `writeBlockComment(int headerWidth, java.lang.String[] lines)` Writes the text as a block comment embedding it into a leading and trailing block-comment-char '$'.
    `void` | `writeBlockComment(java.util.List<java.lang.String> lines)` Writes the text as a block comment embedding it into a leading and trailing block-comment-char '$'.
    `void` | `writeBlockComment(java.lang.String text)` Writes the text as a block comment embedding it into a leading and trailing block-comment-char '$'.
    `void` | `writeComment(java.lang.String line)` Writes a single comment line prefixed by a '#' character.
    `void` | `writeCommentHeader()`
    `void` | `writeCommentHeader(int chars)`
    `void` | `writeCommentHeader(int chars, char separator)`
    `void` | `writeLine()` Writes a new-line character.
    `void` | `writeLine(java.lang.String line)` Writes a line of text without any indentation.
    `void` | `writeListValue(java.lang.Object value)` Writes a single list value.
    `void` | `writeListValues(java.util.Collection<?> values)` Writes the content of a collection as list values.
    `void` | `writeListValues(java.lang.Object... values)` Writes the content of an array as list values.
    `void` | `writeProperties(NdfProperties props)`
    `void` | `writeProperty(java.lang.String key, java.lang.Object... values)` Writes a single property and it's value or multiple values respectively.
    `void` | `writePropertyList(NdfProperties props)` Opens a property-list, writes all the given properties and closes the list.
    `void` | `writeTableRow(java.util.Collection<?> values)` Writes the row values of a table.
    `void` | `writeTableRow(java.lang.Object... values)` Writes the row values of a table.
    `void` | `writeText(java.util.List<java.lang.String> textLines)`
    `void` | `writeText(java.lang.String text)`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `addMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, handleFinish, handleStart, handleSuccess, hasError, hasMonitor, isCancellable, notifyProceeded, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelled`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

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

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

    - ### Methods inherited from interface de.esprit.appsuite.launch.ApplicationObject

      `getApplicationContext`

    - ### Methods inherited from interface de.esprit.common.log.SimpleLogSupport

      `getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning`

- - ### Field Detail

    - #### RIGHT

          public static final NdfTable.Alignment RIGHT

    - #### LEFT

          public static final NdfTable.Alignment LEFT

    - #### defaultBlockCommentFillChar

          public char defaultBlockCommentFillChar

    - #### defaultLineCommentFillChar

          public char defaultLineCommentFillChar

  - ### Constructor Detail

    - #### NdfWriter

          public NdfWriter(C ctx,
                   java.io.File file)

    - #### NdfWriter

          public NdfWriter(C ctx,
                   java.io.File file,
                   boolean isAppendMode)

    - #### NdfWriter

          public NdfWriter(C ctx,
                   java.io.File file,
                   int buffSize)

    - #### NdfWriter

          public NdfWriter(C ctx,
                   java.io.File file,
                   int buffSize,
                   boolean isAppendMode)

    - #### NdfWriter

          public NdfWriter(C ctx,
                   java.io.ByteArrayOutputStream stream)

    - #### NdfWriter

          public NdfWriter(C ctx,
                   java.io.ByteArrayOutputStream stream,
                   int buffSize)

    - #### NdfWriter

          public NdfWriter(C ctx,
                   java.io.ByteArrayOutputStream stream,
                   boolean isAppendMode)

    - #### NdfWriter

          public NdfWriter(C ctx,
                   FileInfo fileInfo,
                   java.io.OutputStream stream)

    - #### NdfWriter

          public NdfWriter(C ctx,
                   FileInfo fileInfo,
                   java.io.OutputStream stream,
                   int buffSize)

  - ### Method Detail

    - #### performWrite

          protected abstract void performWrite()
                                        throws java.lang.Exception

      This method does the actual write of data. It needs to be overridden in subclasses.
      Throws:
        `java.lang.Exception`

    - #### setEncoding

          public void setEncoding(java.lang.String encoding)

      Defines the character encoding to be used. If not set, then the default platform encoding is used.

    - #### getEncoding

          public java.lang.String getEncoding()

      Returns the character encoding being used, null if not set. Note that if the encoding was not explicitly set, then the default platform encoding is used.

    - #### getOutputFile

          public final java.io.File getOutputFile()

    - #### setAppendMode

          public void setAppendMode(boolean isAppendMode)

    - #### executeAsync

          public final void executeAsync()
                                  throws java.lang.Exception

      Description copied from interface: `AsyncExecutable`
      Contains the code to be executed asynchronously. WARNING: This method should never be called directly by the programmer. It rather must be called by `Runnable.run()` for async execution.
      Specified by:
        `executeAsync` in interface `AsyncExecutable<C extends ApplicationContext>`
      Specified by:
        `executeAsync` in class `AbstractAsyncExecutable<C extends ApplicationContext>`
      Throws:
        `java.lang.Exception`
      See Also:
        `for synchronous execution`

    - #### getWriteDuration

          public long getWriteDuration()

    - #### openOutput

          public final void openOutput()
                                throws java.io.FileNotFoundException

      Opens the output file. This has to be done on the first place before writing anything.
      Throws:
        `java.io.FileNotFoundException`
      See Also:
        `close()`

    - #### close

          public void close()
                     throws java.io.IOException

      Closes the output file. This has to be done as the last step.
      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Throws:
        `java.io.IOException`
      See Also:
        `openOutput()`

    - #### setLogChannel

          public final void setLogChannel(LogChannel logCh)

      Specified by:
        `setLogChannel` in interface `SimpleLogSupport`
      Overrides:
        `setLogChannel` in class `AbstractApplicationObject<C extends ApplicationContext>`

    - #### setFixedCreationTimestamp

          public void setFixedCreationTimestamp(DBTimestamp timestamp)

      Enforces the given timestamp to be taken written as the creation time. If not set, then the current time will be used as creation time.

    - #### setFillCharForBlockCommentHeader

          public void setFillCharForBlockCommentHeader(char fillChar)

      Defines the fill char for block-comment header- and footer-lines. The default is '-'.

    - #### setFillCharForLineCommentHeader

          public void setFillCharForLineCommentHeader(char fillChar)

      Defines the fill char for line comment headers. The default is '#'.

    - #### setDefaultCommentHeaderLength

          public void setDefaultCommentHeaderLength(int length)

      Defines the default length of a comment header for both block and line comments. The default is 40.

    - #### setPropertiesIndented

          public final void setPropertiesIndented(boolean isIndented)

      Causes properties to get an indentation. By default properties are not indented like other structures.

    - #### setPropertiesCompacted

          public final void setPropertiesCompacted(boolean isSingleLine)

      Causes properties to be written into a single line. By default all properties are written line by line.

    - #### setPropertiesAligned

          public final void setPropertiesAligned(boolean isAligned)

      Causes properties to be written aligned based on their maximum key size.

    - #### setUseObjectShortCut

          public void setUseObjectShortCut(boolean useShortCut)

    - #### isWriteBodyTextRaw

          public boolean isWriteBodyTextRaw()

      Tells whether body text is written in raw mode - just as it is. By default body text is written optimized.

    - #### setWriteBodyTextRaw

          public final void setWriteBodyTextRaw(boolean isRaw)

      Switches off body text optimization which speeds up writing. In this mode body text is written just as it is. By default body text is cleaned up and splitted in lines which are printed aligned.

    - #### setArrayValuesTabbed

          public final void setArrayValuesTabbed(boolean isTabbed)

      If true, then a TAB character is used as array value separator. By default a SPACE character is used.

    - #### setTableValuesTabbed

          public final void setTableValuesTabbed(boolean isTabbed)

      If true, then a TAB character is used as table value separator. By default a SPACE character is used.

    - #### setMaxArrayValuesByLine

          public final void setMaxArrayValuesByLine(int maxValues)

      Sets the maximum number of array values written into one line.

    - #### setMaxListValuesByLine

          public final void setMaxListValuesByLine(int maxValues)

      Sets the maximum number of list values written into one line.

    - #### setDecimalFormat

          public final void setDecimalFormat(java.text.DecimalFormat format)

      Defines the format for writing decimal array values

    - #### writeLine

          public final void writeLine()
                               throws java.lang.Exception

      Writes a new-line character.
      Throws:
        `java.lang.Exception`

    - #### writeLine

          public final void writeLine(java.lang.String line)
                               throws java.lang.Exception

      Writes a line of text without any indentation.
      Throws:
        `java.lang.Exception`

    - #### openDocument

          public final void openDocument()
                                  throws java.lang.Exception

      Writes the mandatory document header properties.
      Throws:
        `java.lang.Exception`

    - #### openDocument

          public final void openDocument(NdfProperties userProps)
                                  throws java.lang.Exception

      Writes the mandatory document header properties. The given properties are added to the document header.
      Note that no document header properties are written if the output file was opened in append-mode.
      Throws:
        `java.lang.Exception`

    - #### closeDocument

          public final void closeDocument()
                                   throws java.lang.Exception

      Closes the document. Note that at this time all open structures must have been closed such that the indentation level is at zero.
      Throws:
        `java.lang.Exception`

    - #### openPropertyList

          public final void openPropertyList()
                                      throws java.lang.Exception

      Opens a property-list by writing the '<' char.
      Throws:
        `java.lang.Exception`

    - #### closePropertyList

          public final void closePropertyList()
                                       throws java.lang.Exception

      Closes a property-list by writing the '>' char.
      Throws:
        `java.lang.Exception`

    - #### writePropertyList

          public final void writePropertyList(NdfProperties props)
                                       throws java.lang.Exception

      Opens a property-list, writes all the given properties and closes the list.
      Throws:
        `java.lang.Exception`
      See Also:
        `setPropertiesAligned(boolean)`, `setPropertiesCompacted(boolean)`

    - #### writeProperties

          public final void writeProperties(NdfProperties props)
                                     throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeProperty

          public final void writeProperty(java.lang.String key,
                           java.lang.Object... values)
                                   throws java.lang.Exception

      Writes a single property and it's value or multiple values respectively.
      Throws:
        `java.lang.Exception`

    - #### openStructuredObjectProperty

          public final void openStructuredObjectProperty(java.lang.String propertyKey,
                                          java.lang.String objectName)
                                                  throws java.lang.Exception

      Writes a property who's value is an OBJECT structure. It writes the property key and then calls `openObject(String)`.
      Throws:
        `java.lang.Exception`
      See Also:
        `closeStructuredObjectProperty().`

    - #### closeStructuredObjectProperty

          public final void closeStructuredObjectProperty()
                                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`
      See Also:
        `openStructuredObjectProperty(String, String).`

    - #### openStructuredTableProperty

          public final void openStructuredTableProperty(java.lang.String propertyKey,
                                         NdfTable header)
                                                 throws java.lang.Exception

      Writes a property who's value is a TABLE structure. It writes the property key and then calls `openTable(NdfTable, NdfProperties)`.
      Throws:
        `java.lang.Exception`
      See Also:
        `closeStructuredTableProperty().`

    - #### openStructuredTableProperty

          public final void openStructuredTableProperty(java.lang.String propertyKey,
                                         NdfTable header,
                                         NdfProperties props)
                                                 throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### closeStructuredTableProperty

          public final void closeStructuredTableProperty()
                                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`
      See Also:
        `openStructuredTableProperty(String, NdfTable, NdfProperties).`, `openStructuredTableProperty(String, NdfTable).`

    - #### openStructuredArrayProperty

          public final void openStructuredArrayProperty(java.lang.String propertyKey,
                                         java.lang.String arrayName,
                                         int... dimensions)
                                                 throws java.lang.Exception

      Writes a property who's value is an ARRAY structure. It writes the property key and then calls `openArray(String, int...)`.
      Throws:
        `java.lang.Exception`
      See Also:
        `closeStructuredArrayProperty().`

    - #### closeStructuredArrayProperty

          public final void closeStructuredArrayProperty()
                                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`
      See Also:
        `openStructuredArrayProperty(String, String, int...).`

    - #### writeCommentHeader

          public final void writeCommentHeader()
                                        throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeCommentHeader

          public final void writeCommentHeader(int chars)
                                        throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeCommentHeader

          public final void writeCommentHeader(int chars,
                                char separator)
                                        throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeComment

          public final void writeComment(java.lang.String line)
                                  throws java.lang.Exception

      Writes a single comment line prefixed by a '#' character. Note that when the given line starts with '#' then no space will be inserted after the prefixed '#' char.
      If this method is called after a previous `openBlockComment(String)` call, then an indented block comment line is written instead.
      Throws:
        `java.lang.Exception`
      See Also:
        `openBlockComment(String)`, `closeBlockComment()`

    - #### openBlockComment

          public final void openBlockComment(java.lang.String title)
                                      throws java.lang.Exception

      Opens the comment block by inserting the block-comment-char '$' and a titled separator-headline. The title may be null.
      Throws:
        `java.lang.Exception`

    - #### openBlockComment

          public final void openBlockComment(int headerWidth,
                              java.lang.String title)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeBlockComment

          public final void writeBlockComment(java.lang.String text)
                                       throws java.lang.Exception

      Writes the text as a block comment embedding it into a leading and trailing block-comment-char '$'.
      Throws:
        `java.lang.Exception`

    - #### writeBlockComment

          public final void writeBlockComment(int headerWidth,
                               java.lang.String text)
                                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeBlockComment

          public final void writeBlockComment(java.util.List<java.lang.String> lines)
                                       throws java.lang.Exception

      Writes the text as a block comment embedding it into a leading and trailing block-comment-char '$'.
      Throws:
        `java.lang.Exception`

    - #### writeBlockComment

          public final void writeBlockComment(int headerWidth,
                               java.util.List<java.lang.String> lines)
                                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeBlockComment

          public final void writeBlockComment(int headerWidth,
                               java.lang.String[] lines)
                                       throws java.lang.Exception

      Writes the text as a block comment embedding it into a leading and trailing block-comment-char '$'.
      Throws:
        `java.lang.Exception`

    - #### closeBlockComment

          public final void closeBlockComment(java.lang.String title)
                                       throws java.lang.Exception

      Closes the comment block by inserting a titled separator-headline ending with the block-comment-char '$'. The title may be null.
      Throws:
        `java.lang.Exception`

    - #### closeBlockComment

          public final void closeBlockComment()
                                       throws java.lang.Exception

      Closes the comment block by inserting a titled separator-headline ending with the block-comment-char '$'.
      Throws:
        `java.lang.Exception`

    - #### openObject

          public final void openObject(java.lang.String name)
                                throws java.lang.Exception

      Opens an OBJECT structure by writing the structure-key and the objectName.
      Throws:
        `java.lang.Exception`

    - #### openObject

          public final void openObject(java.lang.String name,
                        NdfProperties props)
                                throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### closeObject

          public final void closeObject()
                                 throws java.lang.Exception

      Opens an OBJECT structure.
      Throws:
        `java.lang.Exception`

    - #### openTable

          public final void openTable(NdfTable header)
                               throws java.lang.Exception

      Opens a TABLE structure by writing the structure-key, the tableName and the column-headers.
      Throws:
        `java.lang.Exception`

    - #### openTable

          public final void openTable(NdfTable header,
                       NdfProperties props)
                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### openList

          public final void openList(java.lang.String listName)
                              throws java.lang.Exception

      Opens a LIST structure by writing the structure-key and the listName.
      Throws:
        `java.lang.Exception`

    - #### openList

          public final void openList(java.lang.String listName,
                      NdfProperties props)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeListValues

          public final void writeListValues(java.lang.Object... values)
                                     throws java.lang.Exception

      Writes the content of an array as list values.
      Throws:
        `java.lang.Exception`

    - #### writeListValues

          public final void writeListValues(java.util.Collection<?> values)
                                     throws java.lang.Exception

      Writes the content of a collection as list values.
      Throws:
        `java.lang.Exception`

    - #### writeListValue

          public final void writeListValue(java.lang.Object value)
                                    throws java.lang.Exception

      Writes a single list value.
      Throws:
        `java.lang.Exception`

    - #### closeList

          public final void closeList()
                               throws java.lang.Exception

      Closes a LIST structure.
      Throws:
        `java.lang.Exception`

    - #### writeTableRow

          public final void writeTableRow(java.util.Collection<?> values)
                                   throws java.lang.Exception

      Writes the row values of a table. Note that the value count must match the number of the column-headers.
      Throws:
        `java.lang.Exception`

    - #### writeTableRow

          public final void writeTableRow(java.lang.Object... values)
                                   throws java.lang.Exception

      Writes the row values of a table. Note that the value count must match the number of the column-headers.
      Throws:
        `java.lang.Exception`

    - #### closeTable

          public final void closeTable()
                                throws java.lang.Exception

      Closes a TABLE structure.
      Throws:
        `java.lang.Exception`

    - #### openArray

          public final void openArray(java.lang.String name,
                       int... dimensions)
                               throws java.lang.Exception

      Opens an ARRAY structure.
      Throws:
        `java.lang.Exception`

    - #### openArray

          public final void openArray(java.lang.String name,
                       NdfProperties props,
                       int... dimensions)
                               throws java.lang.Exception

      Opens an ARRAY structure.
      Throws:
        `java.lang.Exception`

    - #### openText

          public final void openText(java.lang.String name)
                              throws java.lang.Exception

      Opens a TEXT structure.
      Throws:
        `java.lang.Exception`

    - #### openText

          public final void openText(java.lang.String name,
                      char endChar)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### openText

          public final void openText(java.lang.String name,
                      NdfProperties props)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### openText

          public final void openText(java.lang.String name,
                      NdfProperties props,
                      char endChar)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### openText

          public final void openText(java.lang.String name,
                      char paragraphChar,
                      char endChar)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### openText

          public final void openText(java.lang.String name,
                      NdfProperties props,
                      char endChar,
                      char paragraphChar)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeText

          public void writeText(java.util.List<java.lang.String> textLines)
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeText

          public void writeText(java.lang.String text)
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### closeText

          public final void closeText()
                               throws java.lang.Exception

      Closes a TEXT structure.
      Throws:
        `java.lang.Exception`

    - #### writeArrayValues

          public final void writeArrayValues(java.lang.Object... values)
                                      throws java.lang.Exception

      Writes array values. Note that the number of values must match the prior defined dimensions.
      Throws:
        `java.lang.Exception`

    - #### writeArrayValues

          public final void writeArrayValues(short[] values)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeArrayValues

          public final void writeArrayValues(int[] values)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeArrayValues

          public final void writeArrayValues(long[] values)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeArrayValues

          public final void writeArrayValues(float[] values)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeArrayValues

          public final void writeArrayValues(double[] values)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeArrayValues

          public final void writeArrayValues(java.lang.String[] values)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeArrayValues

          public final void writeArrayValues(java.util.Collection<?> values)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeArrayValue

          public final void writeArrayValue(java.lang.Object value)
                                     throws java.lang.Exception

      Writes a single array value. Note that the number of values must match the prior defined dimensions.
      Throws:
        `java.lang.Exception`

    - #### closeArray

          public final void closeArray()
                                throws java.lang.Exception

      Closes the ARRAY structure.
      Throws:
        `java.lang.Exception`

    - #### flush

          public void flush()
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.