< prev index next >
src/java.desktop/unix/classes/sun/print/UnixPrintService.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -177,11 +177,11 @@
Sides.class,
};
private static int MAXCOPIES = 1000;
- private static final MediaSizeName mediaSizes[] = {
+ private static final MediaSizeName[] mediaSizes = {
MediaSizeName.NA_LETTER,
MediaSizeName.TABLOID,
MediaSizeName.LEDGER,
MediaSizeName.NA_LEGAL,
MediaSizeName.EXECUTIVE,
@@ -222,11 +222,11 @@
return name;
}
private PrinterIsAcceptingJobs getPrinterIsAcceptingJobsSysV() {
String command = "/usr/bin/lpstat -a " + printer;
- String results[]= PrintServiceLookupProvider.execCmd(command);
+ String[] results= PrintServiceLookupProvider.execCmd(command);
if (results != null && results.length > 0) {
if (results[0].startsWith(printer + " accepting requests")) {
return PrinterIsAcceptingJobs.ACCEPTING_JOBS;
}
@@ -255,11 +255,11 @@
PrintServiceLookupProvider.getBSDCommandIndex();
}
String command = "/usr/sbin/lpc status " + printer
+ lpcStatusCom[PrintServiceLookupProvider.cmdIndex];
- String results[]= PrintServiceLookupProvider.execCmd(command);
+ String[] results= PrintServiceLookupProvider.execCmd(command);
if (results != null && results.length > 0) {
if (PrintServiceLookupProvider.cmdIndex ==
PrintServiceLookupProvider.BSD_LPD_NG) {
if (results[0].startsWith("enabled enabled")) {
@@ -303,11 +303,11 @@
}
private PrinterIsAcceptingJobs getPrinterIsAcceptingJobsAIX() {
// On AIX there should not be a blank after '-a'.
String command = "/usr/bin/lpstat -a" + printer;
- String results[]= PrintServiceLookupProvider.execCmd(command);
+ String[] results= PrintServiceLookupProvider.execCmd(command);
// Remove headers and bogus entries added by remote printers.
results = filterPrinterNamesAIX(results);
if (results != null && results.length > 0) {
@@ -353,11 +353,11 @@
}
}
private QueuedJobCount getQueuedJobCountSysV() {
String command = "/usr/bin/lpstat -R " + printer;
- String results[]= PrintServiceLookupProvider.execCmd(command);
+ String[] results= PrintServiceLookupProvider.execCmd(command);
int qlen = (results == null) ? 0 : results.length;
return new QueuedJobCount(qlen);
}
@@ -370,11 +370,11 @@
}
int qlen = 0;
String command = "/usr/sbin/lpc status " + printer
+ lpcQueueCom[PrintServiceLookupProvider.cmdIndex];
- String results[] = PrintServiceLookupProvider.execCmd(command);
+ String[] results = PrintServiceLookupProvider.execCmd(command);
if (results != null && results.length > 0) {
String queued;
if (PrintServiceLookupProvider.cmdIndex ==
PrintServiceLookupProvider.BSD_LPD_NG) {
@@ -398,11 +398,11 @@
}
private QueuedJobCount getQueuedJobCountAIX() {
// On AIX there should not be a blank after '-a'.
String command = "/usr/bin/lpstat -a" + printer;
- String results[]= PrintServiceLookupProvider.execCmd(command);
+ String[] results= PrintServiceLookupProvider.execCmd(command);
// Remove headers and bogus entries added by remote printers.
results = filterPrinterNamesAIX(results);
int qlen = 0;
@@ -792,11 +792,11 @@
}
}
} else if (category == JobName.class) {
return new JobName("Java Printing", null);
} else if (category == JobSheets.class) {
- JobSheets arr[] = new JobSheets[2];
+ JobSheets[] arr = new JobSheets[2];
arr[0] = JobSheets.NONE;
arr[1] = JobSheets.STANDARD;
return arr;
} else if (category == RequestingUserName.class) {
String userName = "";
< prev index next >