Class AbstractStreamBuilder<T,​B extends AbstractStreamBuilder<T,​B>>

    • Constructor Detail

      • AbstractStreamBuilder

        public AbstractStreamBuilder()
    • Method Detail

      • getCharset

        public java.nio.charset.Charset getCharset()
        Gets the Charset, defaults to Charset.defaultCharset().
        Returns:
        the Charset, defaults to Charset.defaultCharset().
      • setBufferSize

        public B setBufferSize​(int bufferSize)
        Sets the buffer size. Invalid input (bufferSize <= 0) resets the value to its default.

        Subclasses may ignore this setting.

        Parameters:
        bufferSize - the buffer size.
        Returns:
        this.
      • setBufferSize

        public B setBufferSize​(java.lang.Integer bufferSize)
        Sets the buffer size.

        Subclasses may ignore this setting.

        Parameters:
        bufferSize - the buffer size, null resets to the default.
        Returns:
        this.
      • setBufferSizeChecker

        public B setBufferSizeChecker​(java.util.function.IntUnaryOperator bufferSizeChecker)
        Sets the buffer size checker function. Throws a IllegalArgumentException by default.
        Parameters:
        bufferSizeChecker - the buffer size checker function. null resets to the default behavior.
        Returns:
        this
        Since:
        2.14.0
      • setBufferSizeMax

        public B setBufferSizeMax​(int bufferSizeMax)
        The maximum buffer size checked by the buffer size checker. Values less or equal to 0, resets to the int max value. By default, if this value is exceeded, this methods throws an IllegalArgumentException.
        Parameters:
        bufferSizeMax - maximum buffer size checked by the buffer size checker.
        Returns:
        this.
        Since:
        2.14.0
      • setCharset

        public B setCharset​(java.nio.charset.Charset charset)
        Sets the Charset.

        Subclasses may ignore this setting.

        Parameters:
        charset - the Charset, null resets to the default.
        Returns:
        this.
      • setCharset

        public B setCharset​(java.lang.String charset)
        Sets the Charset.

        Subclasses may ignore this setting.

        Parameters:
        charset - the Charset name, null resets to the default.
        Returns:
        this.