Package org.daisy.braille.embosser
Class ConfigurableEmbosser
- java.lang.Object
-
- org.daisy.braille.embosser.AbstractEmbosserWriter
-
- org.daisy.braille.embosser.ConfigurableEmbosser
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,EmbosserProperties,EmbosserWriter,EmbosserWriterProperties
public class ConfigurableEmbosser extends AbstractEmbosserWriter
Provides a configurable embosser. Outputs to a single OutputStream.- Version:
- 22 okt 2008
- Author:
- Joel HÃ¥kansson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfigurableEmbosser.BuilderProvides a builder for ConfigurableEmbosser-
Nested classes/interfaces inherited from class org.daisy.braille.embosser.AbstractEmbosserWriter
AbstractEmbosserWriter.Padding
-
Nested classes/interfaces inherited from interface org.daisy.braille.embosser.EmbosserProperties
EmbosserProperties.PrintMode
-
-
Field Summary
-
Fields inherited from class org.daisy.braille.embosser.AbstractEmbosserWriter
pagebreaks
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadd(byte b)Adds a byte to the EmbosserWriter output.protected voidaddAll(byte[] bytes)Adds bytes to the EmbosserWriter output.voidclose()protected voidformFeed()Performs a form feed on the EmbosserWriterLineBreaksgetLinebreakStyle()Gets the line break style for the EmbosserWriterAbstractEmbosserWriter.PaddinggetPaddingStyle()Gets the form feed padding style for the EmbosserWriterBrailleConvertergetTable()Gets the table for the EmbosserWritervoidopen(boolean duplex)Opens for writing using the default contract-
Methods inherited from class org.daisy.braille.embosser.AbstractEmbosserWriter
currentPage, getMaxHeight, getMaxWidth, getPagebreakStyle, getRowGap, init, isClosed, isOpen, lineFeed, newLine, newPage, newSectionAndPage, newVolumeSectionAndPage, open, pageIsEmpty, setRowGap, supports8dot, supportsAligning, supportsDuplex, supportsPrintMode, supportsVolumes, supportsZFolding, write
-
-
-
-
Method Detail
-
formFeed
protected void formFeed() throws java.io.IOExceptionDescription copied from class:AbstractEmbosserWriterPerforms a form feed on the EmbosserWriter- Overrides:
formFeedin classAbstractEmbosserWriter- Throws:
java.io.IOException- if IO fails
-
add
protected void add(byte b) throws java.io.IOExceptionDescription copied from class:AbstractEmbosserWriterAdds a byte to the EmbosserWriter output.- Specified by:
addin classAbstractEmbosserWriter- Parameters:
b- the byte to add- Throws:
java.io.IOException- if IO fails.
-
addAll
protected void addAll(byte[] bytes) throws java.io.IOExceptionDescription copied from class:AbstractEmbosserWriterAdds bytes to the EmbosserWriter output.- Specified by:
addAllin classAbstractEmbosserWriter- Parameters:
bytes- the bytes to add- Throws:
java.io.IOException- if IO fails
-
getTable
public BrailleConverter getTable()
Description copied from class:AbstractEmbosserWriterGets the table for the EmbosserWriter- Specified by:
getTablein classAbstractEmbosserWriter- Returns:
- returns the table for the EmbosserWriter
-
getLinebreakStyle
public LineBreaks getLinebreakStyle()
Description copied from class:AbstractEmbosserWriterGets the line break style for the EmbosserWriter- Specified by:
getLinebreakStylein classAbstractEmbosserWriter- Returns:
- returns the line break style for the EmbosserWriter
-
getPaddingStyle
public AbstractEmbosserWriter.Padding getPaddingStyle()
Description copied from class:AbstractEmbosserWriterGets the form feed padding style for the EmbosserWriter- Specified by:
getPaddingStylein classAbstractEmbosserWriter- Returns:
- returns the padding style for the EmbosserWriter
-
open
public void open(boolean duplex) throws java.io.IOExceptionDescription copied from interface:EmbosserWriterOpens for writing using the default contract- Specified by:
openin interfaceEmbosserWriter- Overrides:
openin classAbstractEmbosserWriter- Throws:
java.io.IOException- if an I/O exception of some sort has occurred
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classAbstractEmbosserWriter- Throws:
java.io.IOException
-
-