home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / print / PSPrinterJob$PrinterSpooler.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.6 KB  |  43 lines

  1. package sun.print;
  2.  
  3. import java.awt.print.PrinterException;
  4. import java.awt.print.PrinterIOException;
  5. import java.io.IOException;
  6. import java.security.PrivilegedAction;
  7.  
  8. class PSPrinterJob$PrinterSpooler implements PrivilegedAction {
  9.    PrinterException pex;
  10.    // $FF: synthetic field
  11.    final PSPrinterJob this$0;
  12.  
  13.    private PSPrinterJob$PrinterSpooler(PSPrinterJob var1) {
  14.       this.this$0 = var1;
  15.    }
  16.  
  17.    public Object run() {
  18.       try {
  19.          if (this.this$0.spoolFile == null || !this.this$0.spoolFile.exists()) {
  20.             this.pex = new PrinterException("No spool file");
  21.             return null;
  22.          }
  23.  
  24.          String var1 = this.this$0.spoolFile.getAbsolutePath();
  25.          String[] var2 = PSPrinterJob.access$600(this.this$0, PSPrinterJob.access$300(this.this$0), PSPrinterJob.access$400(this.this$0), PSPrinterJob.access$500(this.this$0), this.this$0.getJobNameInt(), 1, var1);
  26.          Process var3 = Runtime.getRuntime().exec(var2);
  27.          var3.waitFor();
  28.          this.this$0.spoolFile.delete();
  29.       } catch (IOException var4) {
  30.          this.pex = new PrinterIOException(var4);
  31.       } catch (InterruptedException var5) {
  32.          this.pex = new PrinterException(var5.toString());
  33.       }
  34.  
  35.       return null;
  36.    }
  37.  
  38.    // $FF: synthetic method
  39.    PSPrinterJob$PrinterSpooler(PSPrinterJob var1, PSPrinterJob.1 var2) {
  40.       this(var1);
  41.    }
  42. }
  43.