Class FileToDeviceEmbosserWriter

    • Constructor Detail

      • FileToDeviceEmbosserWriter

        public FileToDeviceEmbosserWriter​(EmbosserWriter w,
                                          File f,
                                          Device bd)
        Creates a new file-to-device embosser writer.
        Parameters:
        w - the underlying EmbosserWriter
        f - the file used by the supplied EmbosserWriter
        bd - the device to send the file to
    • Method Detail

      • getRowGap

        public int getRowGap()
        Description copied from interface: EmbosserWriter
        Gets the current row gap, measured as an integer multiple of the dot-to-dot height.
        Specified by:
        getRowGap in interface EmbosserWriter
        Returns:
        returns the current row gap
      • isClosed

        public boolean isClosed()
        Description copied from interface: EmbosserWriter
        Tests if embosser has been closed.
        Specified by:
        isClosed in interface EmbosserWriter
        Returns:
        returns true if the embosser has been open, but is now closed, false otherwise
      • isOpen

        public boolean isOpen()
        Description copied from interface: EmbosserWriter
        Returns true if embosser is open.
        Specified by:
        isOpen in interface EmbosserWriter
        Returns:
        returns true if embosser is open, false otherwise
      • newSectionAndPage

        public void newSectionAndPage​(boolean duplex)
                               throws IOException
        Description copied from interface: EmbosserWriter
        Starts a new page on a blank sheet of paper with the specified duplex settings.
        Specified by:
        newSectionAndPage in interface EmbosserWriter
        Parameters:
        duplex - if both sides of sheets should be used, false otherwise
        Throws:
        IOException - if an I/O error occurs
      • newVolumeSectionAndPage

        public void newVolumeSectionAndPage​(boolean duplex)
                                     throws 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 interface EmbosserWriter
        Parameters:
        duplex - if both sides of sheets should be used, false otherwise
        Throws:
        IOException - if an I/O error occurs
      • open

        public void open​(boolean duplex)
                  throws IOException
        Description copied from interface: EmbosserWriter
        Opens for writing using the default contract.
        Specified by:
        open in interface EmbosserWriter
        Parameters:
        duplex - true if both sides of sheets should be used, false otherwise
        Throws:
        IOException - if an I/O error occurs
      • setRowGap

        public void setRowGap​(int value)
        Description copied from interface: EmbosserWriter
        Sets the row gap for following calls to newLine to the specified value, measured as an integer multiple of the dot-to-dot height.
        Specified by:
        setRowGap in interface EmbosserWriter
        Parameters:
        value - the row gap
      • write

        public void write​(String braille)
                   throws IOException
        Description copied from interface: EmbosserWriter
        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.
        Specified by:
        write in interface EmbosserWriter
        Parameters:
        braille - characters in the range 0x2800 to 0x28FF
        Throws:
        IOException - if an I/O error occurs
      • supportsAligning

        public boolean supportsAligning()
        Description copied from interface: EmbosserWriterProperties
        Returns true if this embosser supports aligning. This indicates that rows can be padded with whitespace to move the text block horizontally using the value returned by getMaxWidth. Should return true for all physical embossers, since they all have a finite row length.
        Specified by:
        supportsAligning in interface EmbosserWriterProperties
        Returns:
        returns true if this embosser supports aligning, false otherwise.