Class FormattingOptions


  • public class FormattingOptions
    extends Object
    A collection of parameters for configuring parsing. This includes, but is not necessarily limited to:
    • Tuning the sizes of internal buffers.
    • Field Detail

      • DEFAULT_WRITE_BUFFER

        public static final int DEFAULT_WRITE_BUFFER
        The default size, in bytes, for write operations
        See Also:
        Constant Field Values
    • Constructor Detail

      • FormattingOptions

        public FormattingOptions()
        Creates a collection with default settings:
        • Buffers will use default sizings.
    • Method Detail

      • set

        public void set​(FormattingOptions options)
        Copies the settings from the specified source. Afterwards, this properties object will have the same
        Parameters:
        options - the settings to copy
      • getWriteBuffer

        public int getWriteBuffer()
        Gets the size of the I/O buffer, in bytes, to use for writes.
        Returns:
        the size of the write buffer
      • setWriteBuffer

        public void setWriteBuffer​(int size)
        Sets the size of the I/O buffer, in bytes, to use for writes. The default size is 64K.
        Parameters:
        size - the size of the write buffer
      • getEncodeBuffer

        public int getEncodeBuffer()
        Gets the size of the buffer, in bytes, used to encode character data.
        Returns:
        the decoding buffer size
      • setEncodeBuffer

        public void setEncodeBuffer​(int size)
        Sets the size of the buffer, in bytes, used to encode character data. By default, this will be automatically derived using the character set and write buffer size.
        Parameters:
        size - the encoding buffer size to use