Class BOMInputStream.Builder

    • Field Detail

      • include

        private boolean include
    • Constructor Detail

      • Builder

        public Builder()
        Constructs a new builder of BOMInputStream.
    • Method Detail

      • getDefaultByteOrderMark

        static ByteOrderMark getDefaultByteOrderMark()
        For test access.
        Returns:
        the default byte order mark
      • setByteOrderMarks

        public BOMInputStream.Builder setByteOrderMarks​(ByteOrderMark... byteOrderMarks)
        Sets the ByteOrderMarks to detect and optionally exclude.

        The default is ByteOrderMark.UTF_8.

        Parameters:
        byteOrderMarks - the ByteOrderMarks to detect and optionally exclude.
        Returns:
        this instance.
      • setInclude

        public BOMInputStream.Builder setInclude​(boolean include)
        Sets whether to include the UTF-8 BOM (true) or to exclude it (false).

        The default is false.

        Parameters:
        include - true to include the UTF-8 BOM or false to exclude it. return this;
        Returns:
        this instance.