try {
/**
* Spool to the printer.
*/
if (spoolFile == null || !spoolFile.exists()) {
pex = new PrinterException("No spool file");
return null;
}
String fileName = spoolFile.getAbsolutePath();
String execCmd[] = printExecCmd(mDestination, mOptions,
mNoJobSheet, getJobNameInt(),
1, fileName);
Process process = Runtime.getRuntime().exec(execCmd);
process.waitFor();
spoolFile.delete();
} catch (IOException ex) {
pex = new PrinterIOException(ex);
} catch (InterruptedException ie) {
pex = new PrinterException(ie.toString());
}
return null;
}