Package org.daisy.braille.embosser
Class BufferedVolumeEmbosser
- java.lang.Object
-
- org.daisy.braille.embosser.AbstractEmbosserWriter
-
- org.daisy.braille.embosser.BufferedVolumeEmbosser
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,EmbosserProperties
,EmbosserWriter
,EmbosserWriterProperties
public class BufferedVolumeEmbosser extends AbstractEmbosserWriter
Provides a buffered volume embossers. This is similar toConfigurableEmbosser
, except that it supports writing each volume separately to a PrinterDevice rather than to an OutputStream.- Author:
- Joel HÃ¥kansson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BufferedVolumeEmbosser.Builder
Provides a builder for a BufferedVolumeEmbosser-
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 void
add(byte b)
Adds a byte to the EmbosserWriter output.protected void
addAll(byte[] bytes)
Adds bytes to the EmbosserWriter output.void
close()
protected void
formFeed()
Performs a form feed on the EmbosserWriterLineBreaks
getLinebreakStyle()
Gets the line break style for the EmbosserWriterAbstractEmbosserWriter.Padding
getPaddingStyle()
Gets the form feed padding style for the EmbosserWriterBrailleConverter
getTable()
Gets the table for the EmbosserWritervoid
newVolumeSectionAndPage(boolean duplex)
Starts a new page on a blank sheet of paper in a new volume with the specified duplex settings.void
open(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, open, pageIsEmpty, setRowGap, supports8dot, supportsAligning, supportsDuplex, supportsPrintMode, supportsVolumes, supportsZFolding, write
-
-
-
-
Method Detail
-
open
public void open(boolean duplex) throws java.io.IOException
Description copied from interface:EmbosserWriter
Opens for writing using the default contract- Specified by:
open
in interfaceEmbosserWriter
- Overrides:
open
in classAbstractEmbosserWriter
- Throws:
java.io.IOException
- if an I/O exception of some sort has occurred
-
getTable
public BrailleConverter getTable()
Description copied from class:AbstractEmbosserWriter
Gets the table for the EmbosserWriter- Specified by:
getTable
in classAbstractEmbosserWriter
- Returns:
- returns the table for the EmbosserWriter
-
getLinebreakStyle
public LineBreaks getLinebreakStyle()
Description copied from class:AbstractEmbosserWriter
Gets the line break style for the EmbosserWriter- Specified by:
getLinebreakStyle
in classAbstractEmbosserWriter
- Returns:
- returns the line break style for the EmbosserWriter
-
getPaddingStyle
public AbstractEmbosserWriter.Padding getPaddingStyle()
Description copied from class:AbstractEmbosserWriter
Gets the form feed padding style for the EmbosserWriter- Specified by:
getPaddingStyle
in classAbstractEmbosserWriter
- Returns:
- returns the padding style for the EmbosserWriter
-
add
protected void add(byte b)
Description copied from class:AbstractEmbosserWriter
Adds a byte to the EmbosserWriter output.- Specified by:
add
in classAbstractEmbosserWriter
- Parameters:
b
- the byte to add
-
addAll
protected void addAll(byte[] bytes)
Description copied from class:AbstractEmbosserWriter
Adds bytes to the EmbosserWriter output.- Specified by:
addAll
in classAbstractEmbosserWriter
- Parameters:
bytes
- the bytes to add
-
formFeed
protected void formFeed() throws java.io.IOException
Description copied from class:AbstractEmbosserWriter
Performs a form feed on the EmbosserWriter- Overrides:
formFeed
in classAbstractEmbosserWriter
- Throws:
java.io.IOException
- if IO fails
-
newVolumeSectionAndPage
public void newVolumeSectionAndPage(boolean duplex) throws java.io.IOException
Description copied from interface:EmbosserWriter
Starts a new page on a blank sheet of paper in a new volume with the specified duplex settings.- Specified by:
newVolumeSectionAndPage
in interfaceEmbosserWriter
- Overrides:
newVolumeSectionAndPage
in classAbstractEmbosserWriter
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classAbstractEmbosserWriter
- Throws:
java.io.IOException
-
-