javax.print.attribute.standard
Class Destination

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.print.attribute.URISyntax sample code for javax.print.attribute.URISyntax definition code for javax.print.attribute.URISyntax 
      extended by javax.print.attribute.standard.Destination
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute , PrintJobAttribute sample code for javax.print.attribute.PrintJobAttribute definition code for javax.print.attribute.PrintJobAttribute , PrintRequestAttribute sample code for javax.print.attribute.PrintRequestAttribute definition code for javax.print.attribute.PrintRequestAttribute

public final class Destination
extends URISyntax sample code for javax.print.attribute.URISyntax definition code for javax.print.attribute.URISyntax
implements PrintJobAttribute sample code for javax.print.attribute.PrintJobAttribute definition code for javax.print.attribute.PrintJobAttribute , PrintRequestAttribute sample code for javax.print.attribute.PrintRequestAttribute definition code for javax.print.attribute.PrintRequestAttribute

Class Destination is a printing attribute class, a URI, that is used to indicate an alternate destination for the spooled printer formatted data. Many PrintServices will not support the notion of a destination other than the printer device, and so will not support this attribute.

A common use for this attribute will be applications which want to redirect output to a local disk file : eg."file:out.prn". Note that proper construction of "file:" scheme URI instances should be performed using the toURI() method of class File sample code for java.io.File definition code for java.io.File . See the documentation on that class for more information.

If a destination URI is specified in a PrintRequest and it is not accessible for output by the PrintService, a PrintException will be thrown. The PrintException may implement URIException to provide a more specific cause.

IPP Compatibility: Destination is not an IPP attribute.

See Also:
Serialized Form

Constructor Summary
Destination sample code for javax.print.attribute.standard.Destination.Destination(java.net.URI) definition code for javax.print.attribute.standard.Destination.Destination(java.net.URI) (URI sample code for java.net.URI definition code for java.net.URI  uri)
          Constructs a new destination attribute with the specified URI.
 
Method Summary
 boolean equals sample code for javax.print.attribute.standard.Destination.equals(java.lang.Object) definition code for javax.print.attribute.standard.Destination.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  object)
          Returns whether this destination attribute is equivalent to the passed in object.
 Class sample code for java.lang.Class definition code for java.lang.Class <? extends Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute > getCategory sample code for javax.print.attribute.standard.Destination.getCategory() definition code for javax.print.attribute.standard.Destination.getCategory() ()
          Get the printing attribute class which is to be used as the "category" for this printing attribute value.
 String sample code for java.lang.String definition code for java.lang.String getName sample code for javax.print.attribute.standard.Destination.getName() definition code for javax.print.attribute.standard.Destination.getName() ()
          Get the name of the category of which this attribute value is an instance.
 
Methods inherited from class javax.print.attribute.URISyntax sample code for javax.print.attribute.URISyntax definition code for javax.print.attribute.URISyntax
getURI sample code for javax.print.attribute.URISyntax.getURI() definition code for javax.print.attribute.URISyntax.getURI() , hashCode sample code for javax.print.attribute.URISyntax.hashCode() definition code for javax.print.attribute.URISyntax.hashCode() , toString sample code for javax.print.attribute.URISyntax.toString() definition code for javax.print.attribute.URISyntax.toString()
 
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() , 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() , 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() , 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)
 

Constructor Detail

Destination sample code for javax.print.attribute.standard.Destination(java.net.URI) definition code for javax.print.attribute.standard.Destination(java.net.URI)

public Destination(URI sample code for java.net.URI definition code for java.net.URI  uri)
Constructs a new destination attribute with the specified URI.

Parameters:
uri - URI.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (unchecked exception) Thrown if uri is null.
Method Detail

equals sample code for javax.print.attribute.standard.Destination.equals(java.lang.Object) definition code for javax.print.attribute.standard.Destination.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  object)
Returns whether this destination attribute is equivalent to the passed in object. To be equivalent, all of the following conditions must be true:
  1. object is not null.
  2. object is an instance of class Destination.
  3. This destination attribute's URI and object's URI are equal.

Overrides:
equals sample code for javax.print.attribute.URISyntax.equals(java.lang.Object) definition code for javax.print.attribute.URISyntax.equals(java.lang.Object) in class URISyntax sample code for javax.print.attribute.URISyntax definition code for javax.print.attribute.URISyntax
Parameters:
object - Object to compare to.
Returns:
True if object is equivalent to this destination attribute, false otherwise.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

getCategory sample code for javax.print.attribute.standard.Destination.getCategory() definition code for javax.print.attribute.standard.Destination.getCategory()

public final Class sample code for java.lang.Class definition code for java.lang.Class <? extends Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute > getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.

For class Destination, the category is class Destination itself.

Specified by:
getCategory sample code for javax.print.attribute.Attribute.getCategory() definition code for javax.print.attribute.Attribute.getCategory() in interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute
Returns:
Printing attribute class (category), an instance of class java.lang.Class sample code for java.lang.Class definition code for java.lang.Class .

getName sample code for javax.print.attribute.standard.Destination.getName() definition code for javax.print.attribute.standard.Destination.getName()

public final String sample code for java.lang.String definition code for java.lang.String  getName()
Get the name of the category of which this attribute value is an instance.

For class Destination, the category name is "spool-data-destination".

Specified by:
getName sample code for javax.print.attribute.Attribute.getName() definition code for javax.print.attribute.Attribute.getName() in interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute
Returns:
Attribute category name.