Package org.daisy.braille.embosser
Interface EmbosserWriter
- All Superinterfaces:
AutoCloseable,Closeable,EmbosserProperties,EmbosserWriterProperties
- All Known Implementing Classes:
AbstractEmbosserWriter,BufferedEmbosserWriter,BufferedVolumeEmbosser,ConfigurableEmbosser,FileToDeviceEmbosserWriter
Provides an embosser communication interface. Communication is
flat. For example, only one of these should be called when
starting a new page:
- newPage
- newSectionAndPage
- newVolumeSectionAndPage
- Author:
- Joel HÃ¥kansson
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.daisy.braille.embosser.EmbosserProperties
EmbosserProperties.PrintMode -
Method Summary
Modifier and TypeMethodDescriptionintGets the current row gap, measured as an integer multiple of the dot-to-dot height.booleanisClosed()Tests if embosser has been closedbooleanisOpen()Returns true if embosser is openvoidnewLine()Starts a new linevoidnewPage()Starts a new pagevoidnewSectionAndPage(boolean duplex) Starts a new page on a blank sheet of paper with the specified duplex settings.voidnewVolumeSectionAndPage(boolean duplex) Starts a new page on a blank sheet of paper in a new volume with the specified duplex settings.voidopen(boolean duplex) Opens for writing using the default contractvoidOpens for writingvoidsetRowGap(int value) Sets the row gap for following calls to newLine to the specified value, measured as an integer multiple of the dot-to-dot height.voidWrites a string of braille to the embosser.Methods inherited from interface org.daisy.braille.embosser.EmbosserProperties
supports8dot, supportsAligning, supportsDuplex, supportsPrintMode, supportsVolumes, supportsZFoldingMethods inherited from interface org.daisy.braille.embosser.EmbosserWriterProperties
getMaxHeight, getMaxWidth
-
Method Details
-
write
Writes a string of braille to the embosser. Values must be between 0x2800 and 0x28FF. An implementation may supply a complete row of braille in a single chunk. However, an implementation may also call this method repeatedly without any other calls in between.- Parameters:
braille- characters in the range 0x2800 to 0x28FF- Throws:
IOException
-
newLine
Starts a new line- Throws:
IOException
-
newPage
Starts a new page- Throws:
IOException
-
newSectionAndPage
Starts a new page on a blank sheet of paper with the specified duplex settings.- Parameters:
duplex-- Throws:
IOException
-
newVolumeSectionAndPage
Starts a new page on a blank sheet of paper in a new volume with the specified duplex settings.- Parameters:
duplex-- Throws:
IOException
-
open
Opens for writing using the default contract- Throws:
IOException- if an I/O exception of some sort has occurred
-
open
Opens for writing- Parameters:
duplex-contract-- Throws:
IOException- if an I/O exception of some sort has occurredContractNotSupportedException- if the supplied contract is not supported, that is to say if the contract does not contain information required by the implementation
-
isOpen
boolean isOpen()Returns true if embosser is open- Returns:
- returns true if embosser is open, false otherwise
-
isClosed
boolean isClosed()Tests if embosser has been closed- Returns:
- returns true if the embosser has been open, but is now closed, false otherwise
-
setRowGap
void setRowGap(int value) Sets the row gap for following calls to newLine to the specified value, measured as an integer multiple of the dot-to-dot height.- Parameters:
value-
-
getRowGap
int getRowGap()Gets the current row gap, measured as an integer multiple of the dot-to-dot height.- Returns:
- returns the current row gap
-