6665212: PrinterJob class, method lookupStreamPrintServices(), "fos" in docs is unknown
Reviewed-by: tdv, prr
--- a/jdk/src/share/classes/java/awt/print/PrinterJob.java Thu Dec 04 11:21:26 2008 -0800
+++ b/jdk/src/share/classes/java/awt/print/PrinterJob.java Mon Dec 08 10:23:53 2008 -0800
@@ -117,15 +117,18 @@
* FileOutputStream outstream;
* StreamPrintService psPrinter;
* String psMimeType = "application/postscript";
+ * PrinterJob pj = PrinterJob.getPrinterJob();
*
* StreamPrintServiceFactory[] factories =
* PrinterJob.lookupStreamPrintServices(psMimeType);
* if (factories.length > 0) {
* try {
* outstream = new File("out.ps");
- * psPrinter = factories[0].getPrintService(fos);
+ * psPrinter = factories[0].getPrintService(outstream);
* // psPrinter can now be set as the service on a PrinterJob
- * } catch (FileNotFoundException e) {
+ * pj.setPrintService(psPrinter)
+ * } catch (Exception e) {
+ * e.printStackTrace();
* }
* }
* </pre>