Class TextFileReader.Builder

  • Enclosing class:
    TextFileReader

    public static class TextFileReader.Builder
    extends Object
    Provides a builder for a text file reader.
    • Constructor Detail

      • Builder

        public Builder​(InputStream value)
        Creates a new builder with the specified input stream.
        Parameters:
        value - the input stream
    • Method Detail

      • charset

        public TextFileReader.Builder charset​(Charset value)
        Sets the charset for this builder.
        Parameters:
        value - the charset
        Returns:
        returns this builder
      • regex

        public TextFileReader.Builder regex​(String value)
        Sets the regular expression of this builder.
        Parameters:
        value - the expression to use
        Returns:
        returns this builder
        Throws:
        PatternSyntaxException - If the expression's syntax is invalid
      • limit

        public TextFileReader.Builder limit​(int value)
        Sets the maximum number of times that the specified regular expression is matched on a single row.
        Parameters:
        value - the limit
        Returns:
        returns this builder
      • build

        public TextFileReader build()
        Creates a new text file reader with the current configuration.
        Returns:
        returns a new text file reader