< prev index next >

src/java.desktop/share/classes/javax/print/attribute/standard/JobKOctets.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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


  49  * either right at job submission time or at any later point in time.
  50  * <P>
  51  * The JobKOctets value must not include the multiplicative factors contributed
  52  * by the number of copies specified by the {@link Copies Copies} attribute,
  53  * independent of whether the device can process multiple copies without making
  54  * multiple passes over the job or document data and independent of whether the
  55  * output is collated or not. Thus the value is independent of the
  56  * implementation and indicates the size of the document(s) measured in K octets
  57  * independent of the number of copies.
  58  * <P>
  59  * The JobKOctets value must also not include the multiplicative factor due to a
  60  * copies instruction embedded in the document data. If the document data
  61  * actually includes replications of the document data, this value will include
  62  * such replication. In other words, this value is always the size of the source
  63  * document data, rather than a measure of the hardcopy output to be produced.
  64  * <P>
  65  * The size of a doc is computed based on the print data representation class as
  66  * specified by the doc's {@link javax.print.DocFlavor DocFlavor}, as
  67  * shown in the table below.
  68  *
  69  * <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Table showing computation of doc sizes">


  70  * <TR>
  71  * <TH>Representation Class</TH>
  72  * <TH>Document Size</TH>
  73  * </TR>


  74  * <TR>
  75  * <TD>byte[]</TD>
  76  * <TD>Length of the byte array</TD>
  77  * </TR>
  78  * <TR>
  79  * <TD>java.io.InputStream</TD>
  80  * <TD>Number of bytes read from the stream</TD>
  81  * </TR>
  82  * <TR>
  83  * <TD>char[]</TD>
  84  * <TD>Length of the character array x 2</TD>
  85  * </TR>
  86  * <TR>
  87  * <TD>java.lang.String</TD>
  88  * <TD>Length of the string x 2</TD>
  89  * </TR>
  90  * <TR>
  91  * <TD>java.io.Reader</TD>
  92  * <TD>Number of characters read from the stream x 2</TD>
  93  * </TR>
  94  * <TR>
  95  * <TD>java.net.URL</TD>
  96  * <TD>Number of bytes read from the file at the given URL address</TD>
  97  * </TR>
  98  * <TR>
  99  * <TD>java.awt.image.renderable.RenderableImage</TD>
 100  * <TD>Implementation dependent*</TD>
 101  * </TR>
 102  * <TR>
 103  * <TD>java.awt.print.Printable</TD>
 104  * <TD>Implementation dependent*</TD>
 105  * </TR>
 106  * <TR>
 107  * <TD>java.awt.print.Pageable</TD>
 108  * <TD>Implementation dependent*</TD>
 109  * </TR>

 110  * </TABLE>
 111  * <P>
 112  * * In these cases the Print Service itself generates the print data sent
 113  * to the printer. If the Print Service supports the JobKOctets attribute, for
 114  * these cases the Print Service itself must calculate the size of the print
 115  * data, replacing any JobKOctets value the client specified.
 116  * <P>
 117  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
 118  * category name returned by {@code getName()} gives the IPP attribute
 119  * name.
 120  *
 121  * @see JobKOctetsSupported
 122  * @see JobKOctetsProcessed
 123  * @see JobImpressions
 124  * @see JobMediaSheets
 125  *
 126  * @author  Alan Kaminsky
 127  */
 128 public final class JobKOctets   extends IntegerSyntax
 129         implements PrintRequestAttribute, PrintJobAttribute {


   1 /*
   2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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


  49  * either right at job submission time or at any later point in time.
  50  * <P>
  51  * The JobKOctets value must not include the multiplicative factors contributed
  52  * by the number of copies specified by the {@link Copies Copies} attribute,
  53  * independent of whether the device can process multiple copies without making
  54  * multiple passes over the job or document data and independent of whether the
  55  * output is collated or not. Thus the value is independent of the
  56  * implementation and indicates the size of the document(s) measured in K octets
  57  * independent of the number of copies.
  58  * <P>
  59  * The JobKOctets value must also not include the multiplicative factor due to a
  60  * copies instruction embedded in the document data. If the document data
  61  * actually includes replications of the document data, this value will include
  62  * such replication. In other words, this value is always the size of the source
  63  * document data, rather than a measure of the hardcopy output to be produced.
  64  * <P>
  65  * The size of a doc is computed based on the print data representation class as
  66  * specified by the doc's {@link javax.print.DocFlavor DocFlavor}, as
  67  * shown in the table below.
  68  *
  69  * <table class="striped">
  70  * <caption>Table showing computation of doc sizes</caption>
  71  * <thead>
  72  * <TR>
  73  * <TH>Representation Class</TH>
  74  * <TH>Document Size</TH>
  75  * </TR>
  76  * </thead>
  77  * <tbody>
  78  * <TR>
  79  * <TD>byte[]</TD>
  80  * <TD>Length of the byte array</TD>
  81  * </TR>
  82  * <TR>
  83  * <TD>java.io.InputStream</TD>
  84  * <TD>Number of bytes read from the stream</TD>
  85  * </TR>
  86  * <TR>
  87  * <TD>char[]</TD>
  88  * <TD>Length of the character array x 2</TD>
  89  * </TR>
  90  * <TR>
  91  * <TD>java.lang.String</TD>
  92  * <TD>Length of the string x 2</TD>
  93  * </TR>
  94  * <TR>
  95  * <TD>java.io.Reader</TD>
  96  * <TD>Number of characters read from the stream x 2</TD>
  97  * </TR>
  98  * <TR>
  99  * <TD>java.net.URL</TD>
 100  * <TD>Number of bytes read from the file at the given URL address</TD>
 101  * </TR>
 102  * <TR>
 103  * <TD>java.awt.image.renderable.RenderableImage</TD>
 104  * <TD>Implementation dependent*</TD>
 105  * </TR>
 106  * <TR>
 107  * <TD>java.awt.print.Printable</TD>
 108  * <TD>Implementation dependent*</TD>
 109  * </TR>
 110  * <TR>
 111  * <TD>java.awt.print.Pageable</TD>
 112  * <TD>Implementation dependent*</TD>
 113  * </TR>
 114  * </tbody>
 115  * </TABLE>
 116  * <P>
 117  * * In these cases the Print Service itself generates the print data sent
 118  * to the printer. If the Print Service supports the JobKOctets attribute, for
 119  * these cases the Print Service itself must calculate the size of the print
 120  * data, replacing any JobKOctets value the client specified.
 121  * <P>
 122  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
 123  * category name returned by {@code getName()} gives the IPP attribute
 124  * name.
 125  *
 126  * @see JobKOctetsSupported
 127  * @see JobKOctetsProcessed
 128  * @see JobImpressions
 129  * @see JobMediaSheets
 130  *
 131  * @author  Alan Kaminsky
 132  */
 133 public final class JobKOctets   extends IntegerSyntax
 134         implements PrintRequestAttribute, PrintJobAttribute {


< prev index next >