Class WriterCharAppender

All Implemented Interfaces:
CharAppender, CharSequence

public class WriterCharAppender extends ExpandingCharAppender
Extension of the DefaultCharAppender class to include facilities for writing to an output. Used by writers extending AbstractWriter.

This class introduces the handling of the normalized newline character defined in Format.getNormalizedNewline() and converts it to the newline sequence in Format.getLineSeparator()

It also introduces methods to write to an instance of Writer directly to avoid unnecessary String instantiations.

Author:
Univocity Software Pty Ltd - parsers@univocity.com
See Also:
  • Constructor Details

    • WriterCharAppender

      public WriterCharAppender(int maxLength, String emptyValue, int whitespaceRangeStart, Format format)
      Creates a WriterCharAppender with:
      • a maximum limit of characters to append
      • the default value to return when no characters have been accumulated.
      • the basic Format specification for handling newlines
      The padding character is defaulted to a whitespace character ' '.
      Parameters:
      maxLength - maximum limit of characters to append
      emptyValue - default value to return when no characters have been accumulated
      whitespaceRangeStart - starting range of characters considered to be whitespace.
      format - output format specification used for newline handling
  • Method Details