Package org.daisy.braille.utils.pef
Class PrinterDevice
- java.lang.Object
-
- org.daisy.braille.utils.pef.PrinterDevice
-
-
Constructor Summary
Constructors Constructor Description PrinterDevice(String deviceName, boolean fuzzyLookup)
Create a device with the provided name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PrintService[]
getDevices()
List available devices.void
transmit(File file)
Transmit a file to the device.
-
-
-
Constructor Detail
-
PrinterDevice
public PrinterDevice(String deviceName, boolean fuzzyLookup)
Create a device with the provided name.- Parameters:
deviceName
- the name of the devicefuzzyLookup
- 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 Detail
-
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. Transmit a file to the device.- Specified by:
transmit
in interfaceDevice
- Parameters:
file
- the file to transmit- Throws:
PrintException
- if a print exception occurs
-
-