int l;
ArrayList<StreamPrintServiceFactory> selectedSPSFactories = new ArrayList<StreamPrintServiceFactory>();
StreamPrintServiceFactory factory;
StreamPrintServiceFactory[] a = {};
FactoryLocator fl = new FactoryLocator();
try {
fl.lookupAllFactories();
} catch (IOException io) {
return selectedSPSFactories.toArray(a);
}
listOfSPSFactories = fl.getFactoryClasses();
// no selection
if (flavor == null && outputMimeType == null) {
return (StreamPrintServiceFactory[])listOfSPSFactories.toArray(a);
}