Package javax.print

Examples of javax.print.StreamPrintServiceFactory$Services


                PipedOutputStream spsOutStream = new PipedOutputStream();
                PipedInputStream clientInputStream = new PipedInputStream(
                        spsOutStream);

                DocFlavor newFlavor = null;
                StreamPrintServiceFactory spsf = null;
                DocFlavor clientFlavors[] = printClient
                        .getSupportedDocFlavors();

                for (int i = 0; i < clientFlavors.length; i++) {
                    StreamPrintServiceFactory[] factories = StreamPrintServiceFactory
                            .lookupStreamPrintServiceFactories(userDocDF,
                                    clientFlavors[i].getMimeType());
                    if (factories.length > 0
                            && Class.forName(
                                    clientFlavors[i]
                                            .getRepresentationClassName())
                                    .isInstance(clientInputStream)) {
                        spsf = factories[0];
                        newFlavor = clientFlavors[i];
                        break;
                    }
                }

                if (spsf != null) {
                    StreamPrintService sps = spsf.getPrintService(spsOutStream);

                    /*
                     * Constructing new Doc object for client: - connecting
                     * InputStream of client with OutputStream of
                     * StreamPrintSrevice - constructing DocFlavor for
View Full Code Here

TOP

Related Classes of javax.print.StreamPrintServiceFactory$Services

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.