Class WindowsPrinter

java.lang.Object
oshi.hardware.common.AbstractPrinter
oshi.hardware.common.platform.windows.WindowsPrinter
All Implemented Interfaces:
Printer

@Immutable public abstract class WindowsPrinter extends AbstractPrinter
Common Windows printer logic shared between JNA and FFM implementations.
  • Constructor Details

  • Method Details

    • parseStatus

      protected static Printer.PrinterStatus parseStatus(int statusCode, int errorState)
      Parses Win32_Printer PrinterStatus and DetectedErrorState codes.
      Parameters:
      statusCode - The PrinterStatus code from WMI.
      errorState - The DetectedErrorState code from WMI.
      Returns:
      The corresponding PrinterStatus enum value.
    • parseErrorState

      protected static String parseErrorState(int errorState)
      Converts a DetectedErrorState code to a human-readable string.
      Parameters:
      errorState - The DetectedErrorState code from WMI.
      Returns:
      A string describing the error state.