Class PrinterDevice

java.lang.Object
org.daisy.printing.PrinterDevice
All Implemented Interfaces:
Device

public class PrinterDevice extends Object implements Device
Printer device class of type DocFlavor.INPUT_STREAM.AUTOSENSE This class can be used when sending a file to a printer.
Version:
3 jul 2008
Author:
Joel HÃ¥kansson
  • Constructor Details

    • PrinterDevice

      public PrinterDevice(String deviceName, boolean fuzzyLookup)
      Create a device with the provided name.
      Parameters:
      deviceName - the name of the device
      fuzzyLookup - If true, the returned device is any device whose name contains the supplied deviceName. If false, the returned device name equals the supplied deviceName.
      Throws:
      IllegalArgumentException - if no device is found.
  • Method Details

    • getDevices

      public static PrintService[] getDevices()
      List available devices
      Returns:
      returns a list of available devices that accepts DocFlavor.INPUT_STREAM.AUTOSENSE
    • transmit

      public void transmit(File file) throws PrintException
      Transmit a file to the device
      Specified by:
      transmit in interface Device
      Parameters:
      file - the file to transmit
      Throws:
      FileNotFoundException
      PrintException