📄 e706. determining the capabilities of a print service.txt
字号:
The 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);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -