public abstract class StreamPrintService extends Object implements PrintService
PrintService ,代表一种以不同格式将数据打印到客户端提供的输出流的打印服务。 
       这主要适用于输出格式是适合查看或归档的文档类型的服务。 
       输出格式必须声明为mime类型。 
       这相当于一个输出文档,其中表示类总是“java.io.OutputStream” StreamPrintService类的一个实例是从StreamPrintServiceFactory实例获得的。 
        注意, StreamPrintService来自不同PrintService ,它支持Destination属性。 A StreamPrintService始终需要输出流,而PrintService可选地接受Destination 。 A StreamPrintService的格式化输出没有默认目的地。 另外,一个StreamPrintService预期会以其他上下文中有用的格式生成输出。 StreamPrintService不期望支持Destination属性。 
| 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是否已被处理。 
           如果此对象已被处理,将返回true。 
           由服务和客户端应用程序使用来识别不应写入更多数据的流。 
          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.