Class BOMInputStream.Builder

    • Constructor Detail

    • Method Detail

      • get

        public BOMInputStream get()
                           throws java.io.IOException
        Constructs a new instance.

        This builder use the aspects InputStream, OpenOption[], include, and ByteOrderMark[].

        You must provide an origin that can be converted to an InputStream by this builder, otherwise, this call will throw an UnsupportedOperationException.

        Returns:
        a new instance.
        Throws:
        java.lang.UnsupportedOperationException - if the origin cannot provide an InputStream.
        java.io.IOException - if an I/O error occurs.
        See Also:
        AbstractStreamBuilder.getInputStream()
      • 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