java.lang.Object
javax.print.StreamPrintService
- 所有已实现的接口:
PrintService
此类扩展
PrintService 并表示打印服务,该服务将不同格式的数据打印到客户端提供的输出流。这主要用于输出格式是适合查看或存档的文档类型的服务。输出格式必须声明为 mime 类型。这等同于表示类始终为“java.io.OutputStream”的输出文档风格。StreamPrintService 类的实例是从StreamPrintServiceFactory 实例获得的。
请注意,StreamPrintService 不同于 PrintService,后者支持 Destination 属性。 StreamPrintService 始终需要输出流,而 PrintService 可选择接受 Destination。 StreamPrintService 的格式化输出没有默认目标。此外,预计 StreamPrintService 会以在其他上下文中有用的格式生成输出。 StreamPrintService 不应支持 Destination 属性。
-
构造方法总结
构造方法 -
方法总结
在类 java.lang.Object 中声明的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait在接口 javax.print.PrintService 中声明的方法
addPrintServiceAttributeListener, createPrintJob, equals, getAttribute, getAttributes, getDefaultAttributeValue, getName, getServiceUIFactory, getSupportedAttributeCategories, getSupportedAttributeValues, getSupportedDocFlavors, getUnsupportedAttributes, hashCode, isAttributeCategorySupported, isAttributeValueSupported, isDocFlavorSupported, removePrintServiceAttributeListener
-
构造方法详细信息
-
StreamPrintService
构造一个StreamPrintService对象。- 参数:
out- 向其发送格式化打印数据的流
-
-
方法详情
-
getOutputStream
获取输出流。- 返回:
- 此服务将向其发送格式化打印数据的流
-
getOutputFormat
返回此打印服务发出的文档格式。必须是mimetype格式,兼容DocFlavors的mime类型组件- 返回:
- 识别输出格式的 MIME 类型
- 参见:
-
dispose
public void dispose()处置这个StreamPrintService。如果不能重新使用流服务,则必须对其进行处理以表明这一点。通常,客户端将调用此方法。写入无法有意义地附加到的数据的服务也可以处理流。这不会关闭流。它只是将其标记为不供此服务进一步使用。 -
isDisposed
public boolean isDisposed()返回一个boolean指示此StreamPrintService是否已被处置。如果此对象已被处置,将返回true。服务和客户端应用程序使用它来识别不应写入更多数据的流。- 返回:
true如果这个StreamPrintService已被处置;false否则
-