Class IpacTableWriter

    • Field Detail

      • NULL

        public static java.lang.String NULL
        String representation for null values.
    • Constructor Detail

      • IpacTableWriter

        public IpacTableWriter()
        Constructor.
    • Method Detail

      • docIncludesExample

        public boolean docIncludesExample()
        Description copied from interface: DocumentedIOHandler
        Indicates whether the serialization of some (short) example table should be added to the user documentation for this handler. Binary formats, or instances for which the Documented.getXmlDescription() method already includes some example output, should return false.
        Returns:
        true if the user documentation would benefit from the addition of an example serialization
      • getXmlDescription

        public java.lang.String getXmlDescription()
        Description copied from interface: Documented
        Returns user-directed documentation in XML format.

        The output should be a sequence of one or more <P> elements, using XHTML-like XML. Since rendering may be done in a number of contexts however, use of the full range of XHTML elements is discouraged. Where possible, the content should stick to simple markup such as the elements P, A, UL, OL, LI, DL, DT, DD EM, STRONG, I, B, CODE, TT, PRE.

        Returns:
        XML description of this object
      • formatValue

        public java.lang.String formatValue​(java.lang.Object val,
                                            ValueInfo info,
                                            int width)
        Description copied from class: AbstractTextTableWriter
        Formats a data value for output.
        Specified by:
        formatValue in class AbstractTextTableWriter
        Parameters:
        val - the value
        info - the metadata object describing val's type
        width - maximum preferred width into which the value should be formatted
        Returns:
        formatted string meaning value, preferably no longer than width characters
      • printColumnHeads

        public void printColumnHeads​(java.io.OutputStream out,
                                     int[] colwidths,
                                     ColumnInfo[] cinfos)
                              throws java.io.IOException
        Description copied from class: AbstractTextTableWriter
        Outputs headings for the table columns.
        Specified by:
        printColumnHeads in class AbstractTextTableWriter
        Parameters:
        out - stream to write into
        colwidths - column widths in characters
        cinfos - array of column headings
        Throws:
        java.io.IOException
      • printLine

        protected void printLine​(java.io.OutputStream out,
                                 int[] colwidths,
                                 java.lang.String[] data)
                          throws java.io.IOException
        Description copied from class: AbstractTextTableWriter
        Outputs a line of table data.
        Specified by:
        printLine in class AbstractTextTableWriter
        Parameters:
        out - stream to write into
        colwidths - column widths in characters
        data - array of strings to be output, one per column
        Throws:
        java.io.IOException
      • printSeparator

        protected void printSeparator​(java.io.OutputStream out,
                                      int[] colwidths)
        Description copied from class: AbstractTextTableWriter
        Outputs a decorative separator line, of the sort you might find between the column headings and the table data.
        Specified by:
        printSeparator in class AbstractTextTableWriter
        Parameters:
        out - stream to write into
        colwidths - column widths in characters
      • printParam

        protected void printParam​(java.io.OutputStream out,
                                  java.lang.String name,
                                  java.lang.String value,
                                  java.lang.Class<?> clazz)
                           throws java.io.IOException
        Description copied from class: AbstractTextTableWriter
        Outputs a parameter and its value.
        Specified by:
        printParam in class AbstractTextTableWriter
        Parameters:
        out - stream to write into
        name - parameter name
        value - formatted parameter value
        clazz - type of value
        Throws:
        java.io.IOException