![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e706. Determining the Capabilities of a Print ServiceThe capabilities of a print service are called print service attributes. Examples of print service attributes include: color-supported, printer-name, and queued-job-count. This example demonstrates how to retrieve the current attributes of a print service. To monitor changes to these attributes, see e713 Listening for Print Service Status Changes.Attribute[] attrs = service.getAttributes().toArray(); for (int j=0; j<attrs.length; j++) { String attrName = attrs[j].getName(); // Retrieve the string version of the attribute value String attrValue = attrs[j].toString(); process(service, attrName, attrValue); }
e708. Getting the Default Value of a Print Job Capability e709. Getting the Possible Values for a Print Job Capability © 2002 Addison-Wesley. |