Class TextLineEncoder

    • Constructor Summary

      Constructors 
      Constructor Description
      TextLineEncoder()
      Creates a new instance with the current default Charset and LineDelimiter.UNIX delimiter.
      TextLineEncoder​(java.lang.String delimiter)
      Creates a new instance with the current default Charset and the specified delimiter.
      TextLineEncoder​(java.nio.charset.Charset charset)
      Creates a new instance with the specified charset and LineDelimiter.UNIX delimiter.
      TextLineEncoder​(java.nio.charset.Charset charset, java.lang.String delimiter)
      Creates a new instance with the specified charset and the specified delimiter.
      TextLineEncoder​(java.nio.charset.Charset charset, LineDelimiter delimiter)
      Creates a new instance with the specified charset and the specified delimiter.
      TextLineEncoder​(LineDelimiter delimiter)
      Creates a new instance with the current default Charset and the specified delimiter.
    • Constructor Detail

      • TextLineEncoder

        public TextLineEncoder()
        Creates a new instance with the current default Charset and LineDelimiter.UNIX delimiter.
      • TextLineEncoder

        public TextLineEncoder​(java.lang.String delimiter)
        Creates a new instance with the current default Charset and the specified delimiter.
        Parameters:
        delimiter - The line delimiter to use
      • TextLineEncoder

        public TextLineEncoder​(LineDelimiter delimiter)
        Creates a new instance with the current default Charset and the specified delimiter.
        Parameters:
        delimiter - The line delimiter to use
      • TextLineEncoder

        public TextLineEncoder​(java.nio.charset.Charset charset)
        Creates a new instance with the specified charset and LineDelimiter.UNIX delimiter.
        Parameters:
        charset - The Charset to use
      • TextLineEncoder

        public TextLineEncoder​(java.nio.charset.Charset charset,
                               java.lang.String delimiter)
        Creates a new instance with the specified charset and the specified delimiter.
        Parameters:
        charset - The Charset to use
        delimiter - The line delimiter to use
      • TextLineEncoder

        public TextLineEncoder​(java.nio.charset.Charset charset,
                               LineDelimiter delimiter)
        Creates a new instance with the specified charset and the specified delimiter.
        Parameters:
        charset - The Charset to use
        delimiter - The line delimiter to use
    • Method Detail

      • getMaxLineLength

        public int getMaxLineLength()
        Returns:
        the allowed maximum size of the encoded line. If the size of the encoded line exceeds this value, the encoder will throw a IllegalArgumentException. The default value is Integer.MAX_VALUE.
      • setMaxLineLength

        public void setMaxLineLength​(int maxLineLength)
        Sets the allowed maximum size of the encoded line. If the size of the encoded line exceeds this value, the encoder will throw a IllegalArgumentException. The default value is Integer.MAX_VALUE.
        Parameters:
        maxLineLength - The maximum line length
      • dispose

        public void dispose()
                     throws java.lang.Exception
        Dispose the encoder
        Throws:
        java.lang.Exception - If the dispose failed