public abstract class StreamPrintService extends Object implements PrintService
PrintService代表打印服务的打印数据格式不同,给客户提供的输出流。这主要是用于服务的输出格式是一个适合于查看或归档的文档类型。输出的格式必须声明为MIME类型。这相当于一个输出文件的味道,代表课总是“java IO输出流”的
StreamPrintService类的一个实例是从
StreamPrintServiceFactory实例获得。
请注意,StreamPrintService不同于PrintService,支持Destination属性。一个StreamPrintService总是需要一个输出流,而PrintService选择性地接受一个Destination。一个StreamPrintService为格式化的输出没有默认的目的地。另外一个StreamPrintService预计将产生在其他上下文中有用的格式输出。StreamPrintService不会支持目标属性。
| Modifier | Constructor and Description |
|---|---|
protected |
StreamPrintService(OutputStream out)
构建了一个streamprintservice对象。
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
这
StreamPrintService配置。
|
abstract String |
getOutputFormat()
返回打印服务所发出的文档格式。
|
OutputStream |
getOutputStream()
获取输出流。
|
boolean |
isDisposed()
返回一个
boolean指示是否已设置
StreamPrintService。
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPrintServiceAttributeListener, createPrintJob, equals, getAttribute, getAttributes, getDefaultAttributeValue, getName, getServiceUIFactory, getSupportedAttributeCategories, getSupportedAttributeValues, getSupportedDocFlavors, getUnsupportedAttributes, hashCode, isAttributeCategorySupported, isAttributeValueSupported, isDocFlavorSupported, removePrintServiceAttributeListenerprotected StreamPrintService(OutputStream out)
out流向其发送格式化打印数据。
public OutputStream getOutputStream()
public abstract String getOutputFormat()
public void dispose()
StreamPrintService配置。如果不能重新使用流服务,它必须设置为指示此。通常情况下,客户端将调用此方法。服务写数据不能有意义的附加也可以处理流。这不关闭流。它只是标志着它不为这项服务进一步使用。
public boolean isDisposed()
boolean指示是否已设置
StreamPrintService。如果此对象已被设置,将返回真。使用服务和客户端应用程序来识别没有进一步数据的流。
StreamPrintService已经处理
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.