Interface EmbosserWriter

All Superinterfaces:
AutoCloseable, Closeable, EmbosserProperties, EmbosserWriterProperties
All Known Implementing Classes:
AbstractEmbosserWriter, BufferedEmbosserWriter, BufferedVolumeEmbosser, ConfigurableEmbosser, FileToDeviceEmbosserWriter

public interface EmbosserWriter extends EmbosserWriterProperties, Closeable
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
  • Method Details

    • write

      void write(String braille) throws IOException
      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

      void newLine() throws IOException
      Starts a new line
      Throws:
      IOException
    • newPage

      void newPage() throws IOException
      Starts a new page
      Throws:
      IOException
    • newSectionAndPage

      void newSectionAndPage(boolean duplex) throws IOException
      Starts a new page on a blank sheet of paper with the specified duplex settings.
      Parameters:
      duplex -
      Throws:
      IOException
    • newVolumeSectionAndPage

      void newVolumeSectionAndPage(boolean duplex) throws IOException
      Starts a new page on a blank sheet of paper in a new volume with the specified duplex settings.
      Parameters:
      duplex -
      Throws:
      IOException
    • open

      void open(boolean duplex) throws IOException
      Opens for writing using the default contract
      Throws:
      IOException - if an I/O exception of some sort has occurred
    • open

      void open(boolean duplex, Contract contract) throws IOException, ContractNotSupportedException
      Opens for writing
      Parameters:
      duplex -
      contract -
      Throws:
      IOException - if an I/O exception of some sort has occurred
      ContractNotSupportedException - 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