UnixPrintServiceLookup.java revision 4944
private static boolean pollServices = true;
/* The system property "sun.java2d.print.polling"
pollServices = true;
pollServices = false;
/* The system property "sun.java2d.print.minRefreshTime"
"sun.java2d.print.minRefreshTime"));
} catch (NumberFormatException e) {
static boolean isSysV() {
static boolean isBSD() {
static int getBSDCommandIndex() {
return BSD_LPD_NG;
return BSD_LPD_NG;
return BSD_LPD;
public UnixPrintServiceLookup() {
if (pollServices) {
return printServices;
public synchronized void refreshServices() {
if (isSysV()) {
printerURIs[p],
} catch (Exception e) {
printers[p],
printerURIs[p],
} catch (Exception e) {
new PrintService[] {});
c = s.charAt(i);
return null;
if (isSysV()) {
return printer;
private PrintService[]
return getPrintServices();
return services;
return services;
return services;
return services;
if (services[i].
} catch (IllegalArgumentException e) {
return services;
public MultiDocPrintService[]
if (isSysV()) {
return null;
} catch (Exception e) {
return defaultPrintService;
return inArr;
return outArr;
public void run() {
listener =
return null;
return null;
return null;
return null;
return names;
return defaultPrinter;
return null;
return null;
return name;
return null;
String command = "/usr/bin/lpstat -v|/usr/bin/expand|/usr/bin/cut -f3 -d' ' |/usr/bin/cut -f1 -d':' | /usr/bin/sort";
if (isSysV()) {
new PrivilegedExceptionAction() {
while (!done) {
done = true;
} catch (InterruptedException e) {
!= null) {
return results;
f.delete();
return null;
} catch (PrivilegedActionException e) {
public void run() {
int refreshSecs;
} catch (InterruptedException e) {