20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25 package javax.print.attribute.standard;
26
27 import javax.print.attribute.Attribute;
28 import javax.print.attribute.EnumSyntax;
29 import javax.print.attribute.DocAttribute;
30
31 /**
32 * Class Compression is a printing attribute class, an enumeration, that
33 * specifies how print data is compressed. Compression is an attribute of the
34 * print data (the doc), not of the Print Job. If a Compression attribute is not
35 * specified for a doc, the printer assumes the doc's print data is uncompressed
36 * (i.e., the default Compression value is always {@link #NONE
37 * NONE}).
38 * <P>
39 * <B>IPP Compatibility:</B> The category name returned by
40 * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's
41 * integer value is the IPP enum value. The <code>toString()</code> method
42 * returns the IPP string representation of the attribute value.
43 *
44 * @author Alan Kaminsky
45 */
46 public class Compression extends EnumSyntax implements DocAttribute {
47
48 private static final long serialVersionUID = -5716748913324997674L;
49
50 /**
51 * No compression is used.
52 */
53 public static final Compression NONE = new Compression(0);
54
55 /**
56 * ZIP public domain inflate/deflate compression technology.
57 */
58 public static final Compression DEFLATE = new Compression(1);
59
60 /**
61 * GNU zip compression technology described in
105
106 /**
107 * Get the printing attribute class which is to be used as the "category"
108 * for this printing attribute value.
109 * <P>
110 * For class Compression and any vendor-defined subclasses, the category is
111 * class Compression itself.
112 *
113 * @return Printing attribute class (category), an instance of class
114 * {@link java.lang.Class java.lang.Class}.
115 */
116 public final Class<? extends Attribute> getCategory() {
117 return Compression.class;
118 }
119
120 /**
121 * Get the name of the category of which this attribute value is an
122 * instance.
123 * <P>
124 * For class Compression and any vendor-defined subclasses, the category
125 * name is <CODE>"compression"</CODE>.
126 *
127 * @return Attribute category name.
128 */
129 public final String getName() {
130 return "compression";
131 }
132
133 }
|
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25 package javax.print.attribute.standard;
26
27 import javax.print.attribute.Attribute;
28 import javax.print.attribute.EnumSyntax;
29 import javax.print.attribute.DocAttribute;
30
31 /**
32 * Class Compression is a printing attribute class, an enumeration, that
33 * specifies how print data is compressed. Compression is an attribute of the
34 * print data (the doc), not of the Print Job. If a Compression attribute is not
35 * specified for a doc, the printer assumes the doc's print data is uncompressed
36 * (i.e., the default Compression value is always {@link #NONE
37 * NONE}).
38 * <P>
39 * <B>IPP Compatibility:</B> The category name returned by
40 * {@code getName()} is the IPP attribute name. The enumeration's
41 * integer value is the IPP enum value. The {@code toString()} method
42 * returns the IPP string representation of the attribute value.
43 *
44 * @author Alan Kaminsky
45 */
46 public class Compression extends EnumSyntax implements DocAttribute {
47
48 private static final long serialVersionUID = -5716748913324997674L;
49
50 /**
51 * No compression is used.
52 */
53 public static final Compression NONE = new Compression(0);
54
55 /**
56 * ZIP public domain inflate/deflate compression technology.
57 */
58 public static final Compression DEFLATE = new Compression(1);
59
60 /**
61 * GNU zip compression technology described in
105
106 /**
107 * Get the printing attribute class which is to be used as the "category"
108 * for this printing attribute value.
109 * <P>
110 * For class Compression and any vendor-defined subclasses, the category is
111 * class Compression itself.
112 *
113 * @return Printing attribute class (category), an instance of class
114 * {@link java.lang.Class java.lang.Class}.
115 */
116 public final Class<? extends Attribute> getCategory() {
117 return Compression.class;
118 }
119
120 /**
121 * Get the name of the category of which this attribute value is an
122 * instance.
123 * <P>
124 * For class Compression and any vendor-defined subclasses, the category
125 * name is {@code "compression"}.
126 *
127 * @return Attribute category name.
128 */
129 public final String getName() {
130 return "compression";
131 }
132
133 }
|