public class FileToDeviceEmbosserWriter extends java.lang.Object implements EmbosserWriter
EmbosserProperties.PrintMode
Constructor and Description |
---|
FileToDeviceEmbosserWriter(EmbosserWriter w,
java.io.File f,
Device bd)
Creates a new file-to-device embosser writer.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getMaxHeight()
Gets the maximum page height in the current configuration
|
int |
getMaxWidth()
Gets the maximum row width in the current configuration
|
int |
getRowGap()
Gets the current row gap, measured as an integer
multiple of the dot-to-dot height.
|
boolean |
isClosed()
Tests if embosser has been closed
|
boolean |
isOpen()
Returns true if embosser is open
|
void |
newLine()
Starts a new line
|
void |
newPage()
Starts a new page
|
void |
newSectionAndPage(boolean duplex)
Starts a new page on a blank sheet of paper
with the specified duplex settings.
|
void |
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
|
void |
open(boolean duplex,
Contract contract)
Opens for writing
|
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.
|
boolean |
supports8dot()
Returns true if this embosser supports 8 dot braille
|
boolean |
supportsAligning()
Returns true if this embosser supports aligning.
|
boolean |
supportsDuplex()
Returns true if this embosser supports duplex printing
|
boolean |
supportsPrintMode(EmbosserProperties.PrintMode mode)
Returns true if this embosser supports magazine layout.
|
boolean |
supportsVolumes()
Returns true if this embosser has some method for volume handling
|
boolean |
supportsZFolding()
Returns true if this embosser supports z-folding.
|
void |
write(java.lang.String braille)
Writes a string of braille to the embosser.
|
public FileToDeviceEmbosserWriter(EmbosserWriter w, java.io.File f, Device bd)
w
- the underlying EmbosserWriterf
- the file used by the supplied EmbosserWriterbd
- the device to send the file topublic int getRowGap()
EmbosserWriter
getRowGap
in interface EmbosserWriter
public boolean isClosed()
EmbosserWriter
isClosed
in interface EmbosserWriter
public boolean isOpen()
EmbosserWriter
isOpen
in interface EmbosserWriter
public void newLine() throws java.io.IOException
EmbosserWriter
newLine
in interface EmbosserWriter
java.io.IOException
public void newPage() throws java.io.IOException
EmbosserWriter
newPage
in interface EmbosserWriter
java.io.IOException
public void newSectionAndPage(boolean duplex) throws java.io.IOException
EmbosserWriter
newSectionAndPage
in interface EmbosserWriter
java.io.IOException
public void newVolumeSectionAndPage(boolean duplex) throws java.io.IOException
EmbosserWriter
newVolumeSectionAndPage
in interface EmbosserWriter
java.io.IOException
public void open(boolean duplex) throws java.io.IOException
EmbosserWriter
open
in interface EmbosserWriter
java.io.IOException
- if an I/O exception of some sort has occurredpublic void setRowGap(int value)
EmbosserWriter
setRowGap
in interface EmbosserWriter
public void write(java.lang.String braille) throws java.io.IOException
EmbosserWriter
write
in interface EmbosserWriter
braille
- characters in the range 0x2800 to 0x28FFjava.io.IOException
public int getMaxHeight()
EmbosserWriterProperties
getMaxHeight
in interface EmbosserWriterProperties
public int getMaxWidth()
EmbosserWriterProperties
getMaxWidth
in interface EmbosserWriterProperties
public boolean supports8dot()
EmbosserProperties
supports8dot
in interface EmbosserProperties
public boolean supportsAligning()
EmbosserProperties
getMaxWidth
.
Should return true for all physical embossers, since they all have
a finite row length.supportsAligning
in interface EmbosserProperties
public boolean supportsDuplex()
EmbosserProperties
supportsDuplex
in interface EmbosserProperties
public boolean supportsVolumes()
EmbosserProperties
supportsVolumes
in interface EmbosserProperties
public boolean supportsZFolding()
EmbosserProperties
supportsZFolding
in interface EmbosserProperties
public boolean supportsPrintMode(EmbosserProperties.PrintMode mode)
EmbosserProperties
supportsPrintMode
in interface EmbosserProperties
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public void open(boolean duplex, Contract contract) throws java.io.IOException, ContractNotSupportedException
EmbosserWriter
open
in interface EmbosserWriter
java.io.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