Class UnixPrinter

java.lang.Object
oshi.hardware.common.AbstractPrinter
oshi.hardware.platform.unix.UnixPrinter
All Implemented Interfaces:
oshi.hardware.Printer

@Immutable public final class UnixPrinter extends oshi.hardware.common.AbstractPrinter
CUPS-based printer implementation for Unix-like systems.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface oshi.hardware.Printer

    oshi.hardware.Printer.PrinterStatus
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<oshi.hardware.Printer>
    Gets printers using CUPS.

    Methods inherited from class oshi.hardware.common.AbstractPrinter

    getDescription, getDriverName, getName, getPortName, getStatus, getStatusReason, isDefault, isLocal, toString

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • getPrinters

      public static List<oshi.hardware.Printer> getPrinters()
      Gets printers using CUPS. Uses libcups if available, otherwise falls back to lpstat command.
      Returns:
      A list of printers.