Class FormattingOptions

java.lang.Object
com.pervasive.datarush.operators.io.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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The default size, in bytes, for write operations
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a collection with default settings: Buffers will use default sizings.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the size of the buffer, in bytes, used to encode character data.
    int
    Gets the size of the I/O buffer, in bytes, to use for writes.
    void
    Copies the settings from the specified source.
    void
    setEncodeBuffer(int size)
    Sets the size of the buffer, in bytes, used to encode character data.
    void
    setWriteBuffer(int size)
    Sets the size of the I/O buffer, in bytes, to use for writes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_WRITE_BUFFER

      public static final int DEFAULT_WRITE_BUFFER
      The default size, in bytes, for write operations
      See Also:
  • Constructor Details

    • FormattingOptions

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

    • 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