Class LpstatPrinter

All Implemented Interfaces:
Printer

@Immutable public final class LpstatPrinter extends CupsPrinter
Native-free CUPS printer implementation. Queries printers via the lpstat command rather than libcups, so it works without JNA or FFM native access. Used by platforms whose hardware abstraction layer lives entirely in oshi-common (currently NetBSD).
  • Method Details

    • getPrinters

      public static List<Printer> getPrinters()
      Gets the list of printers known to CUPS by parsing lpstat -p output.
      Returns:
      list of printers, or an empty list if lpstat is unavailable.