Class ConfigurableEmbosser.Builder

  • Enclosing class:
    ConfigurableEmbosser

    public static class ConfigurableEmbosser.Builder
    extends Object
    Provides a builder for ConfigurableEmbosser.
    • Constructor Detail

      • Builder

        public Builder​(OutputStream os,
                       BrailleConverter bt)
        Creates a new builder with the suppled output stream and braille converter.
        Parameters:
        os - the output stream to use
        bt - the braille converter to use
    • Method Detail

      • breaks

        public ConfigurableEmbosser.Builder breaks​(String value)
        Sets the line break style.
        Parameters:
        value - one of dos, unix, mac or default
        Returns:
        returns this object
      • header

        public ConfigurableEmbosser.Builder header​(byte[] value)
        Sets the communication header.
        Parameters:
        value - the header to use
        Returns:
        returns this object
      • footer

        public ConfigurableEmbosser.Builder footer​(byte[] value)
        Sets the communication footer.
        Parameters:
        value - the footer to use
        Returns:
        returns this object
      • fillSheet

        public ConfigurableEmbosser.Builder fillSheet​(boolean value)
        Sets the fill sheet policy. Set to true to fill the last sheet by adding a form feed before closing the communication if the last page has an odd number.
        Parameters:
        value - the value
        Returns:
        returns this object
      • autoLineFeedOnEmptyPage

        public ConfigurableEmbosser.Builder autoLineFeedOnEmptyPage​(boolean value)
        Sets the auto line feed on empty page policy.
        Parameters:
        value - set to true, to add line feed on empty page, false otherwise.
        Returns:
        returns this object
      • build

        public ConfigurableEmbosser build()
        Builds a new ConfigurableEmbosser based on this builders current configuration.
        Returns:
        returns a new ConfigurableEmbosser