< prev index next >

src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java

Print this page




  84 
  85     /**
  86      * Locates factories for print services that can be used with
  87      * a print job to output a stream of data in the
  88      * format specified by {@code outputMimeType}.
  89      * <p>
  90      * The {@code outputMimeType} parameter describes the document type that
  91      * you want to create, whereas the {@code flavor} parameter describes the
  92      * format in which the input data will be provided by the application
  93      * to the {@code StreamPrintService}.
  94      * <p>
  95      * Although null is an acceptable value to use in the lookup of stream
  96      * printing services, it's typical to search for a particular
  97      * desired format, such as Postscript(TM).
  98      *
  99      * @param flavor of the input document type - null means match all
 100      * types.
 101      * @param outputMimeType representing the required output format, used to
 102      * identify suitable stream printer factories. A value of null means
 103      * match all formats.
 104      * @return - matching factories for stream print service instance,
 105      *           empty if no suitable factories could be located.
 106      */
 107      public static StreamPrintServiceFactory[]
 108          lookupStreamPrintServiceFactories(DocFlavor flavor,
 109                                            String outputMimeType) {
 110 
 111          ArrayList<StreamPrintServiceFactory> list = getFactories(flavor, outputMimeType);
 112          return list.toArray(new StreamPrintServiceFactory[list.size()]);
 113      }
 114 
 115     /** Queries the factory for the document format that is emitted
 116      * by printers obtained from this factory.
 117      *
 118      * @return the output format described as a mime type.
 119      */
 120     public abstract String getOutputFormat();
 121 
 122     /**
 123      * Queries the factory for the document flavors that can be accepted
 124      * by printers obtained from this factory.




  84 
  85     /**
  86      * Locates factories for print services that can be used with
  87      * a print job to output a stream of data in the
  88      * format specified by {@code outputMimeType}.
  89      * <p>
  90      * The {@code outputMimeType} parameter describes the document type that
  91      * you want to create, whereas the {@code flavor} parameter describes the
  92      * format in which the input data will be provided by the application
  93      * to the {@code StreamPrintService}.
  94      * <p>
  95      * Although null is an acceptable value to use in the lookup of stream
  96      * printing services, it's typical to search for a particular
  97      * desired format, such as Postscript(TM).
  98      *
  99      * @param flavor of the input document type - null means match all
 100      * types.
 101      * @param outputMimeType representing the required output format, used to
 102      * identify suitable stream printer factories. A value of null means
 103      * match all formats.
 104      * @return   matching factories for stream print service instance,
 105      *           empty if no suitable factories could be located.
 106      */
 107      public static StreamPrintServiceFactory[]
 108          lookupStreamPrintServiceFactories(DocFlavor flavor,
 109                                            String outputMimeType) {
 110 
 111          ArrayList<StreamPrintServiceFactory> list = getFactories(flavor, outputMimeType);
 112          return list.toArray(new StreamPrintServiceFactory[list.size()]);
 113      }
 114 
 115     /** Queries the factory for the document format that is emitted
 116      * by printers obtained from this factory.
 117      *
 118      * @return the output format described as a mime type.
 119      */
 120     public abstract String getOutputFormat();
 121 
 122     /**
 123      * Queries the factory for the document flavors that can be accepted
 124      * by printers obtained from this factory.


< prev index next >