Class FixedWidthWriter

    • Field Detail

      • fieldLengths

        private int[] fieldLengths
      • fieldPaddings

        private char[] fieldPaddings
      • padding

        private char padding
      • defaultPadding

        private char defaultPadding
      • length

        private int length
      • lookaheadFormats

        private Lookup[] lookaheadFormats
      • lookbehindFormats

        private Lookup[] lookbehindFormats
      • lookupChars

        private char[] lookupChars
      • lookbehindFormat

        private Lookup lookbehindFormat
      • rootLengths

        private int[] rootLengths
      • ignore

        private boolean[] ignore
      • rootIgnore

        private boolean[] rootIgnore
      • ignoreCount

        private int ignoreCount
      • rootPaddings

        private char[] rootPaddings
      • defaultHeaderPadding

        private boolean defaultHeaderPadding
      • defaultHeaderAlignment

        private FieldAlignment defaultHeaderAlignment
    • Constructor Detail

      • FixedWidthWriter

        public FixedWidthWriter​(FixedWidthWriterSettings settings)
        The FixedWidthWriter supports all settings provided by FixedWidthWriterSettings, and requires this configuration to be properly initialized.

        Important: by not providing an instance of Writer to this constructor, only the operations that write to Strings are available.

        Parameters:
        settings - the fixed-width writer configuration
      • FixedWidthWriter

        public FixedWidthWriter​(java.io.Writer writer,
                                FixedWidthWriterSettings settings)
        The FixedWidthWriter supports all settings provided by FixedWidthWriterSettings, and requires this configuration to be properly initialized.
        Parameters:
        writer - the output resource that will receive fixed-width records produced by this class.
        settings - the fixed-width writer configuration
      • FixedWidthWriter

        public FixedWidthWriter​(java.io.File file,
                                FixedWidthWriterSettings settings)
        The FixedWidthWriter supports all settings provided by FixedWidthWriterSettings, and requires this configuration to be properly initialized.
        Parameters:
        file - the output file that will receive fixed-width records produced by this class.
        settings - the fixed-width writer configuration
      • FixedWidthWriter

        public FixedWidthWriter​(java.io.File file,
                                java.lang.String encoding,
                                FixedWidthWriterSettings settings)
        The FixedWidthWriter supports all settings provided by FixedWidthWriterSettings, and requires this configuration to be properly initialized.
        Parameters:
        file - the output file that will receive fixed-width records produced by this class.
        encoding - the encoding of the file
        settings - the fixed-width writer configuration
      • FixedWidthWriter

        public FixedWidthWriter​(java.io.File file,
                                java.nio.charset.Charset encoding,
                                FixedWidthWriterSettings settings)
        The FixedWidthWriter supports all settings provided by FixedWidthWriterSettings, and requires this configuration to be properly initialized.
        Parameters:
        file - the output file that will receive fixed-width records produced by this class.
        encoding - the encoding of the file
        settings - the fixed-width writer configuration
      • FixedWidthWriter

        public FixedWidthWriter​(java.io.OutputStream output,
                                FixedWidthWriterSettings settings)
        The FixedWidthWriter supports all settings provided by FixedWidthWriterSettings, and requires this configuration to be properly initialized.
        Parameters:
        output - the output stream that will be written with the fixed-width records produced by this class.
        settings - the fixed-width writer configuration
      • FixedWidthWriter

        public FixedWidthWriter​(java.io.OutputStream output,
                                java.lang.String encoding,
                                FixedWidthWriterSettings settings)
        The FixedWidthWriter supports all settings provided by FixedWidthWriterSettings, and requires this configuration to be properly initialized.
        Parameters:
        output - the output stream that will be written with the fixed-width records produced by this class.
        encoding - the encoding of the stream
        settings - the fixed-width writer configuration
      • FixedWidthWriter

        public FixedWidthWriter​(java.io.OutputStream output,
                                java.nio.charset.Charset encoding,
                                FixedWidthWriterSettings settings)
        The FixedWidthWriter supports all settings provided by FixedWidthWriterSettings, and requires this configuration to be properly initialized.
        Parameters:
        output - the output stream that will be written with the fixed-width records produced by this class.
        encoding - the encoding of the stream
        settings - the fixed-width writer configuration