javax.print
Class StreamPrintService

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.print.StreamPrintService
All Implemented Interfaces:
PrintService sample code for javax.print.PrintService definition code for javax.print.PrintService

public abstract class StreamPrintService
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements PrintService sample code for javax.print.PrintService definition code for javax.print.PrintService

This class extends PrintService sample code for javax.print.PrintService definition code for javax.print.PrintService and represents a print service that prints data in different formats to a client-provided output stream. This is principally intended for services where the output format is a document type suitable for viewing or archiving. The output format must be declared as a mime type. This is equivalent to an output document flavor where the representation class is always "java.io.OutputStream" An instance of the StreamPrintService class is obtained from a StreamPrintServiceFactory sample code for javax.print.StreamPrintServiceFactory definition code for javax.print.StreamPrintServiceFactory instance.

Note that a StreamPrintService is different from a PrintService, which supports a Destination sample code for javax.print.attribute.standard.Destination definition code for javax.print.attribute.standard.Destination attribute. A StreamPrintService always requires an output stream, whereas a PrintService optionally accepts a Destination. A StreamPrintService has no default destination for its formatted output. Additionally a StreamPrintService is expected to generate output in a format useful in other contexts. StreamPrintService's are not expected to support the Destination attribute.


Constructor Summary
protected StreamPrintService sample code for javax.print.StreamPrintService.StreamPrintService(java.io.OutputStream) definition code for javax.print.StreamPrintService.StreamPrintService(java.io.OutputStream) (OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream  out)
          Constructs a StreamPrintService object.
 
Method Summary
 void dispose sample code for javax.print.StreamPrintService.dispose() definition code for javax.print.StreamPrintService.dispose() ()
          Disposes this StreamPrintService.
abstract  String sample code for java.lang.String definition code for java.lang.String getOutputFormat sample code for javax.print.StreamPrintService.getOutputFormat() definition code for javax.print.StreamPrintService.getOutputFormat() ()
          Returns the document format emitted by this print service.
 OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream getOutputStream sample code for javax.print.StreamPrintService.getOutputStream() definition code for javax.print.StreamPrintService.getOutputStream() ()
          Gets the output stream.
 boolean isDisposed sample code for javax.print.StreamPrintService.isDisposed() definition code for javax.print.StreamPrintService.isDisposed() ()
          Returns a boolean indicating whether or not this StreamPrintService has been disposed.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 
Methods inherited from interface javax.print.PrintService sample code for javax.print.PrintService definition code for javax.print.PrintService
addPrintServiceAttributeListener sample code for javax.print.PrintService.addPrintServiceAttributeListener(javax.print.event.PrintServiceAttributeListener) definition code for javax.print.PrintService.addPrintServiceAttributeListener(javax.print.event.PrintServiceAttributeListener) , createPrintJob sample code for javax.print.PrintService.createPrintJob() definition code for javax.print.PrintService.createPrintJob() , equals sample code for javax.print.PrintService.equals(java.lang.Object) definition code for javax.print.PrintService.equals(java.lang.Object) , getAttribute sample code for javax.print.PrintService.getAttribute(java.lang.Class) definition code for javax.print.PrintService.getAttribute(java.lang.Class) , getAttributes sample code for javax.print.PrintService.getAttributes() definition code for javax.print.PrintService.getAttributes() , getDefaultAttributeValue sample code for javax.print.PrintService.getDefaultAttributeValue(java.lang.Class) definition code for javax.print.PrintService.getDefaultAttributeValue(java.lang.Class) , getName sample code for javax.print.PrintService.getName() definition code for javax.print.PrintService.getName() , getServiceUIFactory sample code for javax.print.PrintService.getServiceUIFactory() definition code for javax.print.PrintService.getServiceUIFactory() , getSupportedAttributeCategories sample code for javax.print.PrintService.getSupportedAttributeCategories() definition code for javax.print.PrintService.getSupportedAttributeCategories() , getSupportedAttributeValues sample code for javax.print.PrintService.getSupportedAttributeValues(java.lang.Class, javax.print.DocFlavor, javax.print.attribute.AttributeSet) definition code for javax.print.PrintService.getSupportedAttributeValues(java.lang.Class, javax.print.DocFlavor, javax.print.attribute.AttributeSet) , getSupportedDocFlavors sample code for javax.print.PrintService.getSupportedDocFlavors() definition code for javax.print.PrintService.getSupportedDocFlavors() , getUnsupportedAttributes sample code for javax.print.PrintService.getUnsupportedAttributes(javax.print.DocFlavor, javax.print.attribute.AttributeSet) definition code for javax.print.PrintService.getUnsupportedAttributes(javax.print.DocFlavor, javax.print.attribute.AttributeSet) , hashCode sample code for javax.print.PrintService.hashCode() definition code for javax.print.PrintService.hashCode() , isAttributeCategorySupported sample code for javax.print.PrintService.isAttributeCategorySupported(java.lang.Class) definition code for javax.print.PrintService.isAttributeCategorySupported(java.lang.Class) , isAttributeValueSupported sample code for javax.print.PrintService.isAttributeValueSupported(javax.print.attribute.Attribute, javax.print.DocFlavor, javax.print.attribute.AttributeSet) definition code for javax.print.PrintService.isAttributeValueSupported(javax.print.attribute.Attribute, javax.print.DocFlavor, javax.print.attribute.AttributeSet) , isDocFlavorSupported sample code for javax.print.PrintService.isDocFlavorSupported(javax.print.DocFlavor) definition code for javax.print.PrintService.isDocFlavorSupported(javax.print.DocFlavor) , removePrintServiceAttributeListener sample code for javax.print.PrintService.removePrintServiceAttributeListener(javax.print.event.PrintServiceAttributeListener) definition code for javax.print.PrintService.removePrintServiceAttributeListener(javax.print.event.PrintServiceAttributeListener)
 

Constructor Detail

StreamPrintService sample code for javax.print.StreamPrintService(java.io.OutputStream) definition code for javax.print.StreamPrintService(java.io.OutputStream)

protected StreamPrintService(OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream  out)
Constructs a StreamPrintService object.

Parameters:
out - stream to which to send formatted print data.
Method Detail

getOutputStream sample code for javax.print.StreamPrintService.getOutputStream() definition code for javax.print.StreamPrintService.getOutputStream()

public OutputStream sample code for java.io.OutputStream definition code for java.io.OutputStream  getOutputStream()
Gets the output stream.

Returns:
the stream to which this service will send formatted print data.

getOutputFormat sample code for javax.print.StreamPrintService.getOutputFormat() definition code for javax.print.StreamPrintService.getOutputFormat()

public abstract String sample code for java.lang.String definition code for java.lang.String  getOutputFormat()
Returns the document format emitted by this print service. Must be in mimetype format, compatible with the mime type components of DocFlavors @see DocFlavor.

Returns:
mime type identifying the output format.

dispose sample code for javax.print.StreamPrintService.dispose() definition code for javax.print.StreamPrintService.dispose()

public void dispose()
Disposes this StreamPrintService. If a stream service cannot be re-used, it must be disposed to indicate this. Typically the client will call this method. Services which write data which cannot meaningfully be appended to may also dispose the stream. This does not close the stream. It just marks it as not for further use by this service.


isDisposed sample code for javax.print.StreamPrintService.isDisposed() definition code for javax.print.StreamPrintService.isDisposed()

public boolean isDisposed()
Returns a boolean indicating whether or not this StreamPrintService has been disposed. If this object has been disposed, will return true. Used by services and client applications to recognize streams to which no further data should be written.

Returns:
if this StreamPrintService has been disposed