JavaTM Platform
Standard Ed. 6

javax.print
クラス StreamPrintService

java.lang.Object
  上位を拡張 javax.print.StreamPrintService
すべての実装されたインタフェース:
PrintService

public abstract class StreamPrintService
extends Object
implements PrintService

このクラスは、PrintService を拡張し、クライアントによって指定された出力ストリームに別の形式でデータを印刷する印刷サービスを表します。このクラスは主に、表示や保管に適したドキュメント型を出力形式とするサービスを対象に設計されています。これは、表現クラスが常に「java.io.OutputStream」である出力ドキュメントフレーバと等価です。StreamPrintService クラスのインスタンスは、StreamPrintServiceFactory インスタンスから取得されます。  

StreamPrintService は、Destination 属性をサポートする PrintService とは異なることに留意してください。StreamPrintService は常に出力ストリームを必要とするのに対し、PrintServiceDestination をオプションで受け入れることも可能です。StreamPrintService には、フォーマットされた出力のデフォルトのあて先が存在しません。また、StreamPrintService には、ほかのコンテキストでも利用可能な形式で出力を生成することが期待されます。StreamPrintService が Destination 属性をサポートすることは期待されていません。


コンストラクタの概要
protected StreamPrintService(OutputStream out)
          StreamPrintService オブジェクトを構築します。
 
メソッドの概要
 void dispose()
          この StreamPrintService を破棄します。
abstract  String getOutputFormat()
          この印刷サービスにより発行されたドキュメント形式を返します。
 OutputStream getOutputStream()
          出力ストリームを取得します。
 boolean isDisposed()
          この StreamPrintService が破棄されているかどうかを示す boolean を返します。
 
クラス 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

protected StreamPrintService(OutputStream out)
StreamPrintService オブジェクトを構築します。

パラメータ:
out - フォーマットされた印刷データの送信先ストリーム
メソッドの詳細

getOutputStream

public OutputStream getOutputStream()
出力ストリームを取得します。

戻り値:
このサービスがフォーマットされた印刷データを送信するストリーム

getOutputFormat

public abstract String getOutputFormat()
この印刷サービスにより発行されたドキュメント形式を返します。MIME タイプ形式で、DocFlavor の MIME タイプコンポーネントとの互換性を保持している必要があります。 DocFlavor を参照してください。

戻り値:
出力形式を示す MIME タイプ

dispose

public void dispose()
この StreamPrintService を破棄します。ストリームサービスが再利用できない場合は、利用できないことを示すためにそれを破棄する必要があります。通常は、クライアントがこのメソッドを呼び出します。理由があって追加できないデータを記述するサービスでも、ストリームを破棄することがあります。破棄することによって、ストリームが閉じることはありません。このサービスで今後使用されることがないようにマークが付けられるだけです。


isDisposed

public boolean isDisposed()
この StreamPrintService が破棄されているかどうかを示す boolean を返します。このオブジェクトが破棄されている場合は、true が返されます。サービスおよびクライアントアプリケーションは、これを使用して、データの書き込みがこれ以上行われないストリームを識別します。

戻り値:
この StreamPrintService が処理された場合

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。