Class ConfigurableEmbosser.Builder
- java.lang.Object
-
- org.daisy.braille.utils.impl.tools.embosser.ConfigurableEmbosser.Builder
-
- Enclosing class:
- ConfigurableEmbosser
public static class ConfigurableEmbosser.Builder extends Object
Provides a builder for ConfigurableEmbosser.
-
-
Constructor Summary
Constructors Constructor Description Builder(OutputStream os, BrailleConverter bt)Creates a new builder with the suppled output stream and braille converter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurableEmbosser.BuilderautoLineFeedOnEmptyPage(boolean value)Sets the auto line feed on empty page policy.ConfigurableEmbosser.Builderbreaks(String value)Sets the line break style.ConfigurableEmbosser.Builderbreaks(LineBreaks value)Sets the line break style.ConfigurableEmbosserbuild()Builds a new ConfigurableEmbosser based on this builders current configuration.ConfigurableEmbosser.BuilderembosserProperties(InternalEmbosserWriterProperties props)Sets the embosser properties for this object.ConfigurableEmbosser.BuilderfillSheet(boolean value)Sets the fill sheet policy.ConfigurableEmbosser.Builderfooter(byte[] value)Sets the communication footer.ConfigurableEmbosser.Builderheader(byte[] value)Sets the communication header.ConfigurableEmbosser.BuilderpadNewline(String value)Sets the padding style.ConfigurableEmbosser.BuilderpadNewline(AbstractEmbosserWriter.Padding value)Sets the padding style.ConfigurableEmbosser.Builderpagebreaks(PageBreaks value)Sets the page break style.
-
-
-
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 usebt- the braille converter to use
-
-
Method Detail
-
embosserProperties
public ConfigurableEmbosser.Builder embosserProperties(InternalEmbosserWriterProperties props)
Sets the embosser properties for this object.- Parameters:
props- the embosser properties to use- Returns:
- returns this object
-
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
-
breaks
public ConfigurableEmbosser.Builder breaks(LineBreaks value)
Sets the line break style.- Parameters:
value- the line break style to use- Returns:
- returns this object
-
pagebreaks
public ConfigurableEmbosser.Builder pagebreaks(PageBreaks value)
Sets the page break style.- Parameters:
value- the page break style to use- Returns:
- returns this object
-
padNewline
public ConfigurableEmbosser.Builder padNewline(String value)
Sets the padding style.- Parameters:
value- a padding style- Returns:
- returns this object
-
padNewline
public ConfigurableEmbosser.Builder padNewline(AbstractEmbosserWriter.Padding value)
Sets the padding style.- Parameters:
value- the padding style to use- 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
-
-