Package org.daisy.braille.embosser
Class ConfigurableEmbosser.Builder
java.lang.Object
org.daisy.braille.embosser.ConfigurableEmbosser.Builder
- Enclosing class:
- ConfigurableEmbosser
Provides a builder for ConfigurableEmbosser
- Author:
- Joel HÃ¥kansson
-
Constructor Summary
ConstructorDescriptionBuilder
(OutputStream os, BrailleConverter bt) Creates a new builder with the suppled output stream and braille converter. -
Method Summary
Modifier and TypeMethodDescriptionautoLineFeedOnEmptyPage
(boolean value) Sets the auto line feed on empty page policy.Sets the line break stylebreaks
(LineBreaks value) Sets the line break stylebuild()
Builds a new ConfigurableEmbosser based on this builders current configuration.Sets the embosser properties for this object.fillSheet
(boolean value) Sets the fill sheet policy.footer
(byte[] value) Sets the communication footerheader
(byte[] value) Sets the communication headerpadNewline
(String value) Sets the padding styleSets the padding stylepagebreaks
(PageBreaks value) Sets the page break style
-
Constructor Details
-
Builder
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 Details
-
embosserProperties
Sets the embosser properties for this object.- Parameters:
props
- the embosser properties to use- Returns:
- returns this object
-
breaks
Sets the line break style- Parameters:
value
- one of dos, unix, mac or default- Returns:
- returns this object
-
breaks
Sets the line break style- Parameters:
value
- the line break style to use- Returns:
- returns this object
-
pagebreaks
Sets the page break style- Parameters:
value
- the page break style to use- Returns:
- returns this object
-
padNewline
Sets the padding style- Parameters:
value
- a padding style- Returns:
- returns this object
-
padNewline
Sets the padding style- Parameters:
value
- the padding style to use- Returns:
- returns this object
-
header
Sets the communication header- Parameters:
value
- the header to use- Returns:
- returns this object
-
fillSheet
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
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
Builds a new ConfigurableEmbosser based on this builders current configuration.- Returns:
- returns a new ConfigurableEmbosser
-