2362N/A * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A <code>StreamPrintServiceFactory</code> is the factory for 0N/A * {@link StreamPrintService} instances, 0N/A * which can print to an output stream in a particular 0N/A * document format described as a mime type. 0N/A * A typical output document format may be Postscript(TM). 0N/A * This class is implemented by a service and located by the 0N/A * implementation using the 0N/A * SPI JAR File specification</a>. 0N/A * Applications locate instances of this class by calling the 0N/A * {@link #lookupStreamPrintServiceFactories(DocFlavor, String)} method. 0N/A * Applications can use a <code>StreamPrintService</code> obtained from a 0N/A * factory in place of a <code>PrintService</code> which represents a 0N/A * physical printer device. 0N/A * Locates factories for print services that can be used with 0N/A * a print job to output a stream of data in the 0N/A * format specified by {@code outputMimeType}. 0N/A * The {@code outputMimeType} parameter describes the document type that 0N/A * you want to create, whereas the {@code flavor} parameter describes the 0N/A * format in which the input data will be provided by the application 0N/A * to the {@code StreamPrintService}. 0N/A * Although null is an acceptable value to use in the lookup of stream 0N/A * printing services, it's typical to search for a particular 0N/A * desired format, such as Postscript(TM). 0N/A * @param flavor of the input document type - null means match all 0N/A * @param outputMimeType representing the required output format, used to 0N/A * identify suitable stream printer factories. A value of null means 0N/A * match all formats. 0N/A * @return - matching factories for stream print service instance, 0N/A * empty if no suitable factories could be located. 0N/A /** Queries the factory for the document format that is emitted 0N/A * by printers obtained from this factory. 0N/A * @return the output format described as a mime type. 0N/A * Queries the factory for the document flavors that can be accepted 0N/A * by printers obtained from this factory. 0N/A * @return array of supported doc flavors. 0N/A * Returns a <code>StreamPrintService</code> that can print to 0N/A * the specified output stream. 0N/A * The output stream is created and managed by the application. 0N/A * It is the application's responsibility to close the stream and 0N/A * to ensure that this Printer is not reused. 0N/A * The application should not close this stream until any print job 0N/A * created from the printer is complete. Doing so earlier may generate 0N/A * a <code>PrinterException</code> and an event indicating that the 0N/A * Whereas a <code>PrintService</code> connected to a physical printer 0N/A * a <code>StreamPrintService</code> connected to a stream cannot. 0N/A * The underlying <code>StreamPrintService</code> may be disposed by 0N/A * the print system with 0N/A * the {@link StreamPrintService#dispose() dispose} method 0N/A * before returning from the 0N/A * {@link DocPrintJob#print(Doc, javax.print.attribute.PrintRequestAttributeSet) print} 0N/A * method of <code>DocPrintJob</code> so that the print system knows 0N/A * this printer is no longer usable. 0N/A * This is equivalent to a physical printer going offline - permanently. 0N/A * Applications may supply a null print stream to create a queryable 0N/A * service. It is not valid to create a PrintJob for such a stream. 0N/A * Implementations which allocate resources on construction should examine 0N/A * the stream and may wish to only allocate resources if the stream is 0N/A * @param out destination stream for generated output. 0N/A * @return a PrintService which will generate the format specified by the 0N/A * DocFlavor supported by this Factory. 0N/A /* In the applet case, we continue */