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