javax.print
Class StreamPrintService

java.lang.Object
  extended by javax.print.StreamPrintService
All Implemented Interfaces:
PrintService

public abstract class StreamPrintService
extends Object
implements PrintService

StreamPrintService is a special print service capable of printing into a supplied output stream.

Beside providing the same functionality as a print service it additionally allows to specify the output stream for the print data. A stream print service is obtained via the StreamPrintServiceFactory by looking for services supporting a given output format type.


Constructor Summary
protected StreamPrintService(OutputStream out)
          Constructs a StreamPrintService object.
 
Method Summary
 void dispose()
          Dispose this StreamPrintService object.
abstract  String getOutputFormat()
          Returns the document format emitted by this print service.
 OutputStream getOutputStream()
          Returns the OutputStream of this object.
 boolean isDisposed()
          Determines if this StreamPrintService object is disposed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.print.PrintService
addPrintServiceAttributeListener, createPrintJob, equals, getAttribute, getAttributes, getDefaultAttributeValue, getName, getServiceUIFactory, getSupportedAttributeCategories, getSupportedAttributeValues, getSupportedDocFlavors, getUnsupportedAttributes, hashCode, isAttributeCategorySupported, isAttributeValueSupported, isDocFlavorSupported, removePrintServiceAttributeListener
 

Constructor Detail

StreamPrintService

protected StreamPrintService(OutputStream out)
Constructs a StreamPrintService object.

Parameters:
out - the OutputStream to use
Method Detail

dispose

public void dispose()
Dispose this StreamPrintService object.


getOutputFormat

public abstract String getOutputFormat()
Returns the document format emitted by this print service. The returned string is a MIME type compatible with the DocFlavor class.

Returns:
The document format of the output.

getOutputStream

public OutputStream getOutputStream()
Returns the OutputStream of this object.

Returns:
The OutputStream

isDisposed

public boolean isDisposed()
Determines if this StreamPrintService object is disposed.

Returns:
true if disposed already, otherwise false