< prev index next >

src/java.desktop/share/classes/javax/print/DocFlavor.java

Print this page




 158  * <p>
 159  * See <a href="../../java/lang/package-summary.html#charenc">character
 160  * encodings</a> for more information on the character encodings supported on
 161  * the Java platform.
 162  *
 163  * <hr>
 164  * <h3>Recommended DocFlavors</h3>
 165  * The Java Print Service API does not define any mandatorily supported
 166  * {@code DocFlavors}. However, here are some examples of MIME types that a Java
 167  * Print Service instance might support for client formatted print data. Nested
 168  * classes inside class {@code DocFlavor} declare predefined static constant
 169  * {@code DocFlavor} objects for these example doc flavors; class
 170  * {@code DocFlavor}'s constructor can be used to create an arbitrary doc
 171  * flavor.
 172  * <ul>
 173  *   <li>Preformatted text
 174  *   <table class="striped">
 175  *   <caption>MIME-Types and their descriptions</caption>
 176  *   <thead>
 177  *     <tr>
 178  *       <th>MIME-Type
 179  *       <th>Description
 180  *   </thead>
 181  *   <tbody>
 182  *     <tr>
 183  *       <td>{@code "text/plain"}
 184  *       <td>Plain text in the default character set (US-ASCII)
 185  *     <tr>
 186  *       <td><code> "text/plain; charset=<i>xxx</i>"</code>
 187  *       <td>Plain text in character set <i>xxx</i>
 188  *     <tr>
 189  *       <td>{@code "text/html"}
 190  *       <td>HyperText Markup Language in the default character set (US-ASCII)
 191  *     <tr>
 192  *       <td><code> "text/html; charset=<i>xxx</i>"</code>
 193  *       <td>HyperText Markup Language in character set <i>xxx</i>
 194  *   </tbody>
 195  *   </table>
 196  *   In general, preformatted text print data is provided either in a character
 197  *   oriented representation class (character array, String, Reader) or in a
 198  *   byte oriented representation class (byte array, InputStream, URL).
 199  *   <li>Preformatted page description language (PDL) documents
 200  *   <table class="striped">
 201  *   <caption>MIME-Types and their descriptions</caption>
 202  *   <thead>
 203  *     <tr>
 204  *       <th>MIME-Type
 205  *       <th>Description
 206  *   </thead>
 207  *   <tbody>
 208  *     <tr>
 209  *       <td>{@code "application/pdf"}
 210  *       <td>Portable Document Format document
 211  *     <tr>
 212  *       <td>{@code "application/postscript"}
 213  *       <td>PostScript document
 214  *     <tr>
 215  *       <td>{@code "application/vnd.hp-PCL"}
 216  *       <td>Printer Control Language document
 217  *   </tbody>
 218  *   </table>
 219  *   In general, preformatted PDL print data is provided in a byte oriented
 220  *   representation class (byte array, {@code InputStream}, {@code URL}).
 221  *   <li>Preformatted images
 222  *   <table class="striped">
 223  *   <caption>MIME-Types and their descriptions</caption>
 224  *   <thead>
 225  *     <tr>
 226  *       <th>MIME-Type
 227  *       <th>Description
 228  *   </thead>
 229  *   <tbody>
 230  *     <tr>
 231  *       <td>{@code "image/gif"}
 232  *       <td>Graphics Interchange Format image
 233  *     <tr>
 234  *       <td>{@code "image/jpeg"}
 235  *       <td>Joint Photographic Experts Group image
 236  *     <tr>
 237  *       <td>{@code "image/png"}
 238  *       <td>Portable Network Graphics image
 239  *   </tbody>
 240  *   </table>
 241  *   In general, preformatted image print data is provided in a byte oriented
 242  *   representation class (byte array, {@code InputStream}, {@code URL}).
 243  *   <li>Preformatted autosense print data
 244  *   <table class="striped">
 245  *   <caption>MIME-Types and their descriptions</caption>
 246  *   <thead>
 247  *     <tr>
 248  *       <th>MIME-Type
 249  *       <th>Description
 250  *   </thead>
 251  *   <tbody>
 252  *     <tr>
 253  *       <td>{@code "application/octet-stream"}
 254  *       <td>The print data format is unspecified (just an octet stream)
 255  *   </tbody>
 256  *   </table>
 257  *   The printer decides how to interpret the print data; the way this
 258  *   "autosensing" works is implementation dependent. In general, preformatted
 259  *   autosense print data is provided in a byte oriented representation class
 260  *   (byte array, {@code InputStream}, {@code URL}).
 261  * </ul>
 262  *
 263  * <hr>
 264  * <h3>Service Formatted Print Data</h3>
 265  * For <b>service formatted print data</b>, the Java Print Service instance
 266  * determines the print data format. The doc flavor's representation class
 267  * denotes an interface whose methods the {@code DocPrintJob} invokes to
 268  * determine the content to be printed -- such as a renderable image interface
 269  * or a Java printable interface. The doc flavor's MIME type is the special
 270  * value {@code "application/x-java-jvm-local-objectref"} indicating the client
 271  * will supply a reference to a Java object that implements the interface named
 272  * as the representation class. This MIME type is just a placeholder; what's
 273  * important is the print data representation class.




 158  * <p>
 159  * See <a href="../../java/lang/package-summary.html#charenc">character
 160  * encodings</a> for more information on the character encodings supported on
 161  * the Java platform.
 162  *
 163  * <hr>
 164  * <h3>Recommended DocFlavors</h3>
 165  * The Java Print Service API does not define any mandatorily supported
 166  * {@code DocFlavors}. However, here are some examples of MIME types that a Java
 167  * Print Service instance might support for client formatted print data. Nested
 168  * classes inside class {@code DocFlavor} declare predefined static constant
 169  * {@code DocFlavor} objects for these example doc flavors; class
 170  * {@code DocFlavor}'s constructor can be used to create an arbitrary doc
 171  * flavor.
 172  * <ul>
 173  *   <li>Preformatted text
 174  *   <table class="striped">
 175  *   <caption>MIME-Types and their descriptions</caption>
 176  *   <thead>
 177  *     <tr>
 178  *       <th scope="col">MIME-Type
 179  *       <th scope="col">Description
 180  *   </thead>
 181  *   <tbody>
 182  *     <tr>
 183  *       <th scope="row">{@code "text/plain"}
 184  *       <td>Plain text in the default character set (US-ASCII)
 185  *     <tr>
 186  *       <th scope="row"><code> "text/plain; charset=<i>xxx</i>"</code>
 187  *       <td>Plain text in character set <i>xxx</i>
 188  *     <tr>
 189  *       <th scope="row">{@code "text/html"}
 190  *       <td>HyperText Markup Language in the default character set (US-ASCII)
 191  *     <tr>
 192  *       <th scope="row"><code> "text/html; charset=<i>xxx</i>"</code>
 193  *       <td>HyperText Markup Language in character set <i>xxx</i>
 194  *   </tbody>
 195  *   </table>
 196  *   In general, preformatted text print data is provided either in a character
 197  *   oriented representation class (character array, String, Reader) or in a
 198  *   byte oriented representation class (byte array, InputStream, URL).
 199  *   <li>Preformatted page description language (PDL) documents
 200  *   <table class="striped">
 201  *   <caption>MIME-Types and their descriptions</caption>
 202  *   <thead>
 203  *     <tr>
 204  *       <th scope="col">MIME-Type
 205  *       <th scope="col">Description
 206  *   </thead>
 207  *   <tbody>
 208  *     <tr>
 209  *       <th scope="row">{@code "application/pdf"}
 210  *       <td>Portable Document Format document
 211  *     <tr>
 212  *       <th scope="row">{@code "application/postscript"}
 213  *       <td>PostScript document
 214  *     <tr>
 215  *       <th scope="row">{@code "application/vnd.hp-PCL"}
 216  *       <td>Printer Control Language document
 217  *   </tbody>
 218  *   </table>
 219  *   In general, preformatted PDL print data is provided in a byte oriented
 220  *   representation class (byte array, {@code InputStream}, {@code URL}).
 221  *   <li>Preformatted images
 222  *   <table class="striped">
 223  *   <caption>MIME-Types and their descriptions</caption>
 224  *   <thead>
 225  *     <tr>
 226  *       <th scope="col">MIME-Type
 227  *       <th scope="col">Description
 228  *   </thead>
 229  *   <tbody>
 230  *     <tr>
 231  *       <th scope="row">{@code "image/gif"}
 232  *       <td>Graphics Interchange Format image
 233  *     <tr>
 234  *       <th scope="row">{@code "image/jpeg"}
 235  *       <td>Joint Photographic Experts Group image
 236  *     <tr>
 237  *       <th scope="row">{@code "image/png"}
 238  *       <td>Portable Network Graphics image
 239  *   </tbody>
 240  *   </table>
 241  *   In general, preformatted image print data is provided in a byte oriented
 242  *   representation class (byte array, {@code InputStream}, {@code URL}).
 243  *   <li>Preformatted autosense print data
 244  *   <table class="striped">
 245  *   <caption>MIME-Types and their descriptions</caption>
 246  *   <thead>
 247  *     <tr>
 248  *       <th scope="col">MIME-Type
 249  *       <th scope="col">Description
 250  *   </thead>
 251  *   <tbody>
 252  *     <tr>
 253  *       <th scope="row">{@code "application/octet-stream"}
 254  *       <td>The print data format is unspecified (just an octet stream)
 255  *   </tbody>
 256  *   </table>
 257  *   The printer decides how to interpret the print data; the way this
 258  *   "autosensing" works is implementation dependent. In general, preformatted
 259  *   autosense print data is provided in a byte oriented representation class
 260  *   (byte array, {@code InputStream}, {@code URL}).
 261  * </ul>
 262  *
 263  * <hr>
 264  * <h3>Service Formatted Print Data</h3>
 265  * For <b>service formatted print data</b>, the Java Print Service instance
 266  * determines the print data format. The doc flavor's representation class
 267  * denotes an interface whose methods the {@code DocPrintJob} invokes to
 268  * determine the content to be printed -- such as a renderable image interface
 269  * or a Java printable interface. The doc flavor's MIME type is the special
 270  * value {@code "application/x-java-jvm-local-objectref"} indicating the client
 271  * will supply a reference to a Java object that implements the interface named
 272  * as the representation class. This MIME type is just a placeholder; what's
 273  * important is the print data representation class.


< prev index next >