org.apache.nutch.indexwriter.csv

## Class CSVIndexWriter.Separator

- java.lang.Object
- - org.apache.nutch.indexwriter.csv.CSVIndexWriter.Separator

- Enclosing class:
    CSVIndexWriter

      protected class CSVIndexWriter.Separator
      extends java.lang.Object

  represent separators (also quote and escape characters) as char(s) and byte(s) in the output encoding for efficiency.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected byte[]` | `bytes`
    `protected char[]` | `chars`
    `protected java.lang.String` | `sepStr`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Separator(java.lang.String sep)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `find(java.lang.String value, int start)` Get index of first occurrence of any separator characters.
    `protected void` | `set(java.lang.String str)`
    `protected void` | `setFromConf(IndexWriterParams parameters, java.lang.String property)`
    `protected void` | `setFromConf(IndexWriterParams parameters, java.lang.String property, boolean isChar)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### sepStr

          protected java.lang.String sepStr

    - #### chars

          protected char[] chars

    - #### bytes

          protected byte[] bytes

  - ### Constructor Detail

    - #### Separator

          protected Separator(java.lang.String sep)

  - ### Method Detail

    - #### set

          protected void set(java.lang.String str)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### setFromConf

          protected void setFromConf(IndexWriterParams parameters,
                                     java.lang.String property)

    - #### setFromConf

          protected void setFromConf(IndexWriterParams parameters,
                                     java.lang.String property,
                                     boolean isChar)

    - #### find

          protected int find(java.lang.String value,
                             int start)

      Get index of first occurrence of any separator characters.
      Parameters:
        `value` - String to scan
        `start` - position/index to start scan from
      Returns:
        position of first occurrence or -1 (not found or empty separator)

Copyright © 2019 The Apache Software Foundation