src/java.desktop/share/classes/javax/print/DocFlavor.java
author psadhukhan
Mon, 10 Jun 2019 10:52:11 +0530
changeset 55366 de1d2a535c08
parent 54397 65030bbf5ac1
permissions -rw-r--r--
8225368: broken links in java.desktop files Reviewed-by: serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
45648
87c997b74bb8 8180326: Update the tables in java.desktop to be HTML-5 friendly
serb
parents: 35667
diff changeset
     2
 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1738
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1738
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1738
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1738
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1738
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.print;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.io.IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.io.ObjectInputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.io.ObjectOutputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.Serializable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
/**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    34
 * Class {@code DocFlavor} encapsulates an object that specifies the format in
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    35
 * which print data is supplied to a {@link DocPrintJob}. "Doc" is a short,
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    36
 * easy-to-pronounce term that means "a piece of print data." The print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    37
 * format, or "doc flavor", consists of two things:
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    38
 * <ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    39
 *   <li><b>MIME type.</b> This is a Multipurpose Internet Mail Extensions
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    40
 *   (MIME) media type (as defined in
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    41
 *   <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a> and
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    42
 *   <a href="http://www.ietf.org/rfc/rfc2046.txt">RFC 2046</a>) that specifies
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    43
 *   how the print data is to be interpreted. The charset of text data should be
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    44
 *   the IANA MIME-preferred name, or its canonical name if no preferred name is
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    45
 *   specified. Additionally a few historical names supported by earlier
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    46
 *   versions of the Java platform may be recognized. See
55366
de1d2a535c08 8225368: broken links in java.desktop files
psadhukhan
parents: 54397
diff changeset
    47
 *   <a href="../../../java.base/java/lang/package-summary.html#charenc">
de1d2a535c08 8225368: broken links in java.desktop files
psadhukhan
parents: 54397
diff changeset
    48
 *   character encodings</a> for more information on the character encodings
de1d2a535c08 8225368: broken links in java.desktop files
psadhukhan
parents: 54397
diff changeset
    49
 *   supported on the Java platform.
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    50
 *   <li><b>Representation class name.</b> This specifies the fully-qualified
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    51
 *   name of the class of the object from which the actual print data comes, as
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    52
 *   returned by the {@link Class#getName() Class.getName()} method. (Thus the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    53
 *   class name for {@code byte[]} is {@code "[B"}, for {@code char[]} it is
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    54
 *   {@code "[C"}.)
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    55
 * </ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    56
 * A {@code DocPrintJob} obtains its print data by means of interface
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    57
 * {@link Doc Doc}. A {@code Doc} object lets the {@code DocPrintJob} determine
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    58
 * the doc flavor the client can supply. A {@code Doc} object also lets the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    59
 * {@code DocPrintJob} obtain an instance of the doc flavor's representation
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    60
 * class, from which the {@code DocPrintJob} then obtains the actual print data.
22260
c9185e010e03 8031082: Fix non-missing doclint problems in client libraries
darcy
parents: 21278
diff changeset
    61
 *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    62
 * <hr>
54397
65030bbf5ac1 8220250: fix headings in java.desktop
psadhukhan
parents: 47498
diff changeset
    63
 * <h2>Client Formatted Print Data</h2>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    64
 * There are two broad categories of print data, client formatted print data and
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    65
 * service formatted print data.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    66
 * <p>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    67
 * For <b>client formatted print data</b>, the client determines or knows the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    68
 * print data format. For example the client may have a JPEG encoded image, a
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    69
 * {@code URL} for HTML code, or a disk file containing plain text in some
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    70
 * encoding, possibly obtained from an external source, and requires a way to
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    71
 * describe the data format to the print service.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * The doc flavor's representation class is a conduit for the JPS
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    74
 * {@code DocPrintJob} to obtain a sequence of characters or bytes from the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    75
 * client. The doc flavor's MIME type is one of the standard media types telling
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    76
 * how to interpret the sequence of characters or bytes. For a list of standard
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    77
 * media types, see the Internet Assigned Numbers Authority's (IANA's)
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    78
 * <a href="http://www.iana.org/assignments/media-types/">Media Types Directory
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    79
 * </a>. Interface {@link Doc Doc} provides two utility operations,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * {@link Doc#getReaderForText() getReaderForText} and
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    81
 * {@link Doc#getStreamForBytes() getStreamForBytes()}, to help a {@code Doc}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    82
 * object's client extract client formatted print data.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    83
 * <p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * For client formatted print data, the print data representation class is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * typically one of the following (although other representation classes are
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * permitted):
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    87
 * <ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    88
 *   <li>Character array ({@code char[]}) -- The print data consists of the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    89
 *   Unicode characters in the array.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    90
 *   <li>{@code String} -- The print data consists of the Unicode characters in
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    91
 *   the string.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    92
 *   <li>Character stream ({@link java.io.Reader java.io.Reader}) -- The print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    93
 *   data consists of the Unicode characters read from the stream up to the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    94
 *   end-of-stream.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    95
 *   <li>Byte array ({@code byte[]}) -- The print data consists of the bytes in
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    96
 *   the array. The bytes are encoded in the character set specified by the doc
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    97
 *   flavor's MIME type. If the MIME type does not specify a character set, the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    98
 *   default character set is US-ASCII.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
    99
 *   <li>Byte stream ({@link java.io.InputStream java.io.InputStream}) -- The
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   100
 *   print data consists of the bytes read from the stream up to the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   101
 *   end-of-stream. The bytes are encoded in the character set specified by the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   102
 *   doc flavor's MIME type. If the MIME type does not specify a character set,
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   103
 *   the default character set is US-ASCII.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   104
 *   <li>Uniform Resource Locator ({@link java.net.URL URL}) -- The print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   105
 *   consists of the bytes read from the URL location. The bytes are encoded in
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   106
 *   the character set specified by the doc flavor's MIME type. If the MIME type
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   107
 *   does not specify a character set, the default character set is US-ASCII.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   108
 *   When the representation class is a {@code URL}, the print service itself
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   109
 *   accesses and downloads the document directly from its {@code URL} address,
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   110
 *   without involving the client. The service may be some form of network print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   111
 *   service which is executing in a different environment. This means you
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   112
 *   should not use a {@code URL} print data flavor to print a document at a
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   113
 *   restricted {@code URL} that the client can see but the printer cannot see.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   114
 *   This also means you should not use a {@code URL} print data flavor to print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   115
 *   a document stored in a local file that is not available at a {@code URL}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   116
 *   accessible independently of the client. For example, a file that is not
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   117
 *   served up by an HTTP server or FTP server. To print such documents, let the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   118
 *   client open an input stream on the {@code URL} or file and use an input
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   119
 *   stream data flavor.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   120
 * </ul>
22260
c9185e010e03 8031082: Fix non-missing doclint problems in client libraries
darcy
parents: 21278
diff changeset
   121
 *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   122
 * <hr>
54397
65030bbf5ac1 8220250: fix headings in java.desktop
psadhukhan
parents: 47498
diff changeset
   123
 * <h2>Default and Platform Encodings</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * For byte print data where the doc flavor's MIME type does not include a
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   125
 * {@code charset} parameter, the Java Print Service instance assumes the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 * US-ASCII character set by default. This is in accordance with
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   127
 * <a href="http://www.ietf.org/rfc/rfc2046.txt">RFC 2046</a>, which says the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   128
 * default character set is US-ASCII. Note that US-ASCII is a subset of UTF-8,
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   129
 * so in the future this may be widened if a future RFC endorses UTF-8 as the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   130
 * default in a compatible manner.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 * <p>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   132
 * Also note that this is different than the behaviour of the Java runtime when
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   133
 * interpreting a stream of bytes as text data. That assumes the default
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   134
 * encoding for the user's locale. Thus, when spooling a file in local encoding
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   135
 * to a Java Print Service it is important to correctly specify the encoding.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   136
 * Developers working in the English locales should be particularly conscious of
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   137
 * this, as their platform encoding corresponds to the default mime charset. By
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   138
 * this coincidence that particular case may work without specifying the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   139
 * encoding of platform data.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 * Every instance of the Java virtual machine has a default character encoding
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 * determined during virtual-machine startup and typically depends upon the
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   143
 * locale and charset being used by the underlying operating system. In a
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   144
 * distributed environment there is no guarantee that two VM share the same
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   145
 * default encoding. Thus clients which want to stream platform encoded text
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   146
 * data from the host platform to a Java Print Service instance must explicitly
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   147
 * declare the charset and not rely on defaults.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
 * The preferred form is the official IANA primary name for an encoding.
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   150
 * Applications which stream text data should always specify the charset in the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   151
 * mime type, which necessitates obtaining the encoding of the host platform for
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   152
 * data (eg files) stored in that platform's encoding. A {@code CharSet} which
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   153
 * corresponds to this and is suitable for use in a mime-type for a
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   154
 * {@code DocFlavor} can be obtained from
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   155
 * {@link DocFlavor#hostEncoding DocFlavor.hostEncoding} This may not always be
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   156
 * the primary IANA name but is guaranteed to be understood by this VM. For
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   157
 * common flavors, the pre-defined *HOST {@code DocFlavors} may be used.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
 * <p>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   159
 * See <a href="../../java/lang/package-summary.html#charenc">character
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   160
 * encodings</a> for more information on the character encodings supported on
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   161
 * the Java platform.
22260
c9185e010e03 8031082: Fix non-missing doclint problems in client libraries
darcy
parents: 21278
diff changeset
   162
 *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   163
 * <hr>
54397
65030bbf5ac1 8220250: fix headings in java.desktop
psadhukhan
parents: 47498
diff changeset
   164
 * <h2>Recommended DocFlavors</h2>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   165
 * The Java Print Service API does not define any mandatorily supported
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   166
 * {@code DocFlavors}. However, here are some examples of MIME types that a Java
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   167
 * Print Service instance might support for client formatted print data. Nested
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   168
 * classes inside class {@code DocFlavor} declare predefined static constant
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   169
 * {@code DocFlavor} objects for these example doc flavors; class
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   170
 * {@code DocFlavor}'s constructor can be used to create an arbitrary doc
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   171
 * flavor.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   172
 * <ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   173
 *   <li>Preformatted text
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   174
 *   <table class="striped">
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   175
 *   <caption>MIME-Types and their descriptions</caption>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   176
 *   <thead>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   177
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   178
 *       <th scope="col">MIME-Type
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   179
 *       <th scope="col">Description
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   180
 *   </thead>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   181
 *   <tbody>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   182
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   183
 *       <th scope="row">{@code "text/plain"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   184
 *       <td>Plain text in the default character set (US-ASCII)
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   185
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   186
 *       <th scope="row"><code> "text/plain; charset=<i>xxx</i>"</code>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   187
 *       <td>Plain text in character set <i>xxx</i>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   188
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   189
 *       <th scope="row">{@code "text/html"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   190
 *       <td>HyperText Markup Language in the default character set (US-ASCII)
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   191
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   192
 *       <th scope="row"><code> "text/html; charset=<i>xxx</i>"</code>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   193
 *       <td>HyperText Markup Language in character set <i>xxx</i>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   194
 *   </tbody>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   195
 *   </table>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   196
 *   In general, preformatted text print data is provided either in a character
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   197
 *   oriented representation class (character array, String, Reader) or in a
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   198
 *   byte oriented representation class (byte array, InputStream, URL).
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   199
 *   <li>Preformatted page description language (PDL) documents
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   200
 *   <table class="striped">
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   201
 *   <caption>MIME-Types and their descriptions</caption>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   202
 *   <thead>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   203
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   204
 *       <th scope="col">MIME-Type
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   205
 *       <th scope="col">Description
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   206
 *   </thead>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   207
 *   <tbody>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   208
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   209
 *       <th scope="row">{@code "application/pdf"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   210
 *       <td>Portable Document Format document
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   211
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   212
 *       <th scope="row">{@code "application/postscript"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   213
 *       <td>PostScript document
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   214
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   215
 *       <th scope="row">{@code "application/vnd.hp-PCL"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   216
 *       <td>Printer Control Language document
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   217
 *   </tbody>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   218
 *   </table>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   219
 *   In general, preformatted PDL print data is provided in a byte oriented
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   220
 *   representation class (byte array, {@code InputStream}, {@code URL}).
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   221
 *   <li>Preformatted images
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   222
 *   <table class="striped">
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   223
 *   <caption>MIME-Types and their descriptions</caption>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   224
 *   <thead>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   225
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   226
 *       <th scope="col">MIME-Type
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   227
 *       <th scope="col">Description
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   228
 *   </thead>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   229
 *   <tbody>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   230
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   231
 *       <th scope="row">{@code "image/gif"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   232
 *       <td>Graphics Interchange Format image
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   233
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   234
 *       <th scope="row">{@code "image/jpeg"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   235
 *       <td>Joint Photographic Experts Group image
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   236
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   237
 *       <th scope="row">{@code "image/png"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   238
 *       <td>Portable Network Graphics image
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   239
 *   </tbody>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   240
 *   </table>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   241
 *   In general, preformatted image print data is provided in a byte oriented
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   242
 *   representation class (byte array, {@code InputStream}, {@code URL}).
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   243
 *   <li>Preformatted autosense print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   244
 *   <table class="striped">
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   245
 *   <caption>MIME-Types and their descriptions</caption>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   246
 *   <thead>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   247
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   248
 *       <th scope="col">MIME-Type
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   249
 *       <th scope="col">Description
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   250
 *   </thead>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   251
 *   <tbody>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   252
 *     <tr>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   253
 *       <th scope="row">{@code "application/octet-stream"}
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   254
 *       <td>The print data format is unspecified (just an octet stream)
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   255
 *   </tbody>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   256
 *   </table>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   257
 *   The printer decides how to interpret the print data; the way this
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   258
 *   "autosensing" works is implementation dependent. In general, preformatted
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   259
 *   autosense print data is provided in a byte oriented representation class
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   260
 *   (byte array, {@code InputStream}, {@code URL}).
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   261
 * </ul>
22260
c9185e010e03 8031082: Fix non-missing doclint problems in client libraries
darcy
parents: 21278
diff changeset
   262
 *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   263
 * <hr>
54397
65030bbf5ac1 8220250: fix headings in java.desktop
psadhukhan
parents: 47498
diff changeset
   264
 * <h2>Service Formatted Print Data</h2>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   265
 * For <b>service formatted print data</b>, the Java Print Service instance
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
 * determines the print data format. The doc flavor's representation class
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   267
 * denotes an interface whose methods the {@code DocPrintJob} invokes to
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   268
 * determine the content to be printed -- such as a renderable image interface
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   269
 * or a Java printable interface. The doc flavor's MIME type is the special
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   270
 * value {@code "application/x-java-jvm-local-objectref"} indicating the client
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   271
 * will supply a reference to a Java object that implements the interface named
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   272
 * as the representation class. This MIME type is just a placeholder; what's
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
 * important is the print data representation class.
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   274
 * <p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
 * For service formatted print data, the print data representation class is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
 * typically one of the following (although other representation classes are
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   277
 * permitted). Nested classes inside class {@code DocFlavor} declare predefined
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   278
 * static constant {@code DocFlavor} objects for these example doc flavors;
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   279
 * class {@code DocFlavor}'s constructor can be used to create an arbitrary doc
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   280
 * flavor.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   281
 * <ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   282
 *   <li>Renderable image object -- The client supplies an object that
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   283
 *   implements interface
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   284
 *   {@link java.awt.image.renderable.RenderableImage RenderableImage}. The
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   285
 *   printer calls methods in that interface to obtain the image to be printed.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   286
 *   <li>Printable object -- The client supplies an object that implements
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   287
 *   interface {@link java.awt.print.Printable Printable}. The printer calls
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   288
 *   methods in that interface to obtain the pages to be printed, one by one.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   289
 *   For each page, the printer supplies a graphics context, and whatever the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   290
 *   client draws in that graphics context gets printed.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   291
 *   <li>Pageable object -- The client supplies an object that implements
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   292
 *   interface {@link java.awt.print.Pageable Pageable}. The printer calls
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   293
 *   methods in that interface to obtain the pages to be printed, one by one.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   294
 *   For each page, the printer supplies a graphics context, and whatever the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   295
 *   client draws in that graphics context gets printed.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   296
 * </ul>
22260
c9185e010e03 8031082: Fix non-missing doclint problems in client libraries
darcy
parents: 21278
diff changeset
   297
 *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   298
 * <hr>
54397
65030bbf5ac1 8220250: fix headings in java.desktop
psadhukhan
parents: 47498
diff changeset
   299
 * <h2>Pre-defined Doc Flavors</h2>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   300
 * A Java Print Service instance is not <b><i>required</i></b> to support the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   301
 * following print data formats and print data representation classes. In fact,
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   302
 * a developer using this class should <b>never</b> assume that a particular
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   303
 * print service supports the document types corresponding to these pre-defined
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   304
 * doc flavors. Always query the print service to determine what doc flavors it
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   305
 * supports. However, developers who have print services that support these doc
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   306
 * flavors are encouraged to refer to the predefined singleton instances created
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   307
 * here.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   308
 * <ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   309
 *   <li>Plain text print data provided through a byte stream. Specifically, the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   310
 *   following doc flavors are recommended to be supported:
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   311
 *   <br>&#183;&nbsp;&nbsp;
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   312
 *   {@code ("text/plain", "java.io.InputStream")}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   313
 *   <br>&#183;&nbsp;&nbsp;
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   314
 *   {@code ("text/plain; charset=us-ascii", "java.io.InputStream")}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   315
 *   <br>&#183;&nbsp;&nbsp;
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   316
 *   {@code ("text/plain; charset=utf-8", "java.io.InputStream")}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   317
 *   <li>Renderable image objects. Specifically, the following doc flavor is
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   318
 *   recommended to be supported:
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   319
 *   <br>&#183;&nbsp;&nbsp;
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   320
 *   {@code ("application/x-java-jvm-local-objectref", "java.awt.image.renderable.RenderableImage")}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   321
 * </ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   322
 * A Java Print Service instance is allowed to support any other doc flavors (or
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   323
 * none) in addition to the above mandatory ones, at the implementation's
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
 * choice.
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   325
 * <p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
 * Support for the above doc flavors is desirable so a printing client can rely
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
 * on being able to print on any JPS printer, regardless of which doc flavors
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
 * the printer supports. If the printer doesn't support the client's preferred
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
 * doc flavor, the client can at least print plain text, or the client can
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
 * convert its data to a renderable image and print the image.
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   331
 * <p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
 * Furthermore, every Java Print Service instance must fulfill these
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
 * requirements for processing plain text print data:
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   334
 * <ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   335
 *   <li>The character pair carriage return-line feed (CR-LF) means "go to
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   336
 *   column 1 of the next line."
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   337
 *   <li>A carriage return (CR) character standing by itself means "go to column
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   338
 *   1 of the next line."
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   339
 *   <li>A line feed (LF) character standing by itself means "go to column 1 of
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   340
 *   the next line."
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   341
 * </ul>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
 * The client must itself perform all plain text print data formatting not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
 * addressed by the above requirements.
22260
c9185e010e03 8031082: Fix non-missing doclint problems in client libraries
darcy
parents: 21278
diff changeset
   344
 *
54397
65030bbf5ac1 8220250: fix headings in java.desktop
psadhukhan
parents: 47498
diff changeset
   345
 * <h2>Design Rationale</h2>
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   346
 * Class {@code DocFlavor} in package {@code javax.print} is similar to class
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   347
 * {@link java.awt.datatransfer.DataFlavor}. Class {@code DataFlavor} is not
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   348
 * used in the Java Print Service (JPS) API for three reasons which are all
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   349
 * rooted in allowing the JPS API to be shared by other print services APIs
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   350
 * which may need to run on Java profiles which do not include all of the Java
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   351
 * Platform, Standard Edition.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   352
 * <ol type=1>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   353
 *   <li>The JPS API is designed to be used in Java profiles which do not
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   354
 *   support AWT.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   355
 *   <li>The implementation of class {@code java.awt.datatransfer.DataFlavor}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   356
 *   does not guarantee that equivalent data flavors will have the same
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   357
 *   serialized representation. {@code DocFlavor} does, and can be used in
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   358
 *   services which need this.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   359
 *   <li>The implementation of class {@code java.awt.datatransfer.DataFlavor}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   360
 *   includes a human presentable name as part of the serialized representation.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   361
 *   This is not appropriate as part of a service matching constraint.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   362
 * </ol>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   363
 * Class {@code DocFlavor}'s serialized representation uses the following
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   364
 * canonical form of a MIME type string. Thus, two doc flavors with MIME types
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   365
 * that are not identical but that are equivalent (that have the same canonical
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   366
 * form) may be considered equal.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   367
 * <ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   368
 *   <li>The media type, media subtype, and parameters are retained, but all
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   369
 *   comments and whitespace characters are discarded.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   370
 *   <li>The media type, media subtype, and parameter names are converted to
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   371
 *   lowercase.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   372
 *   <li>The parameter values retain their original case, except a charset
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   373
 *   parameter value for a text media type is converted to lowercase.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   374
 *   <li>Quote characters surrounding parameter values are removed.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   375
 *   <li>Quoting backslash characters inside parameter values are removed.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   376
 *   <li>The parameters are arranged in ascending order of parameter name.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   377
 * </ul>
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   378
 * Class {@code DocFlavor}'s serialized representation also contains the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   379
 * fully-qualified class <i>name</i> of the representation class (a
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   380
 * {@code String} object), rather than the representation class itself (a
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   381
 * {@code Class} object). This allows a client to examine the doc flavors a Java
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   382
 * Print Service instance supports without having to load the representation
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   383
 * classes, which may be problematic for limited-resource clients.
22260
c9185e010e03 8031082: Fix non-missing doclint problems in client libraries
darcy
parents: 21278
diff changeset
   384
 *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   385
 * @author Alan Kaminsky
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
public class DocFlavor implements Serializable, Cloneable {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   389
    /**
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   390
     * Use serialVersionUID from JDK 1.4 for interoperability.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   391
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
    private static final long serialVersionUID = -4512080796965449721L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   395
     * A string representing the host operating system encoding. This will
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   396
     * follow the conventions documented in
5820
4f5e99470724 6967036: Need to fix links with // in Javadoc comments
ohair
parents: 5627
diff changeset
   397
     * <a href="http://www.ietf.org/rfc/rfc2278.txt">
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
     * <i>RFC&nbsp;2278:&nbsp;IANA Charset Registration Procedures</i></a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
     * except where historical names are returned for compatibility with
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   400
     * previous versions of the Java platform. The value returned from method is
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   401
     * valid only for the VM which returns it, for use in a {@code DocFlavor}.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   402
     * This is the charset for all the "HOST" pre-defined {@code DocFlavors} in
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
     * the executing VM.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
    public static final String hostEncoding;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
    static {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
        hostEncoding =
22584
eed64ee05369 8032733: Fix cast lint warnings in client libraries
darcy
parents: 22260
diff changeset
   409
            java.security.AccessController.doPrivileged(
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
                  new sun.security.action.GetPropertyAction("file.encoding"));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
     * MIME type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
    private transient MimeType myMimeType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
     * Representation class name.
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   420
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
     * @serial
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
    private String myClassName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
     * String value for this doc flavor. Computed when needed and cached.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
    private transient String myStringValue = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
     * Constructs a new doc flavor object from the given MIME type and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
     * representation class name. The given MIME type is converted into
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
     * canonical form and stored internally.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   435
     * @param  mimeType MIME media type string
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   436
     * @param  className fully-qualified representation class name
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   437
     * @throws NullPointerException if {@code mimeType} or {@code className} is
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   438
     *         {@code null}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   439
     * @throws IllegalArgumentException if {@code mimeType} does not obey the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   440
     *         syntax for a MIME media type string
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
    public DocFlavor(String mimeType, String className) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
        if (className == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
            throw new NullPointerException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
        myMimeType = new MimeType (mimeType);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
        myClassName = className;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   451
     * Returns this doc flavor object's MIME type string based on the canonical
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   452
     * form. Each parameter value is enclosed in quotes.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   453
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
     * @return the mime type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
    public String getMimeType() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
        return myMimeType.getMimeType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
     * Returns this doc flavor object's media type (from the MIME type).
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   462
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
     * @return the media type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
    public String getMediaType() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
        return myMimeType.getMediaType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
     * Returns this doc flavor object's media subtype (from the MIME type).
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   471
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
     * @return the media sub-type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
    public String getMediaSubtype() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
        return myMimeType.getMediaSubtype();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   479
     * Returns a {@code String} representing a MIME parameter. Mime types may
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   480
     * include parameters which are usually optional. The charset for text types
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   481
     * is a commonly useful example. This convenience method will return the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   482
     * value of the specified parameter if one was specified in the mime type
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   483
     * for this flavor.
25770
d132697706ea 8037511: Tidy warnings cleanup for java.awt - 2d part
avstepan
parents: 25093
diff changeset
   484
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   485
     * @param  paramName the name of the parameter. This name is internally
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   486
     *         converted to the canonical lower case format before performing
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   487
     *         the match.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   488
     * @return a string representing a mime parameter, or {@code null} if that
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   489
     *         parameter is not in the mime type string
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   490
     * @throws NullPointerException if paramName is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
    public String getParameter(String paramName) {
25093
8ec5ec01740e 8042864: Fix raw and unchecked warnings in javax.print
darcy
parents: 22950
diff changeset
   493
        return myMimeType.getParameterMap().get(paramName.toLowerCase());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
     * Returns the name of this doc flavor object's representation class.
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   498
     *
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   499
     * @return the name of the representation class
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    public String getRepresentationClassName() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
        return myClassName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   506
     * Converts this {@code DocFlavor} to a string.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   508
     * @return MIME type string based on the canonical form. Each parameter
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   509
     *         value is enclosed in quotes. A "class=" parameter is appended to
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   510
     *         the MIME type string to indicate the representation class name.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
        return getStringValue();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
     * Returns a hash code for this doc flavor object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
    public int hashCode() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
        return getStringValue().hashCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   524
     * Determines if this doc flavor object is equal to the given object. The
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   525
     * two are equal if the given object is not {@code null}, is an instance of
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   526
     * {@code DocFlavor}, has a MIME type equivalent to this doc flavor object's
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   527
     * MIME type (that is, the MIME types have the same media type, media
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   528
     * subtype, and parameters), and has the same representation class name as
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   529
     * this doc flavor object. Thus, if two doc flavor objects' MIME types are
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   530
     * the same except for comments, they are considered equal. However, two doc
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   531
     * flavor objects with MIME types of "text/plain" and "text/plain;
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   532
     * charset=US-ASCII" are not considered equal, even though they represent
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   533
     * the same media type (because the default character set for plain text is
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   534
     * US-ASCII).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   536
     * @param  obj {@code Object} to test
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   537
     * @return {@code true} if this doc flavor object equals {@code obj},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   538
     *         {@code false} otherwise
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
    public boolean equals(Object obj) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
        return
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
            obj != null &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
            obj instanceof DocFlavor &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
            getStringValue().equals (((DocFlavor) obj).getStringValue());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     * Returns this doc flavor object's string value.
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   549
     *
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   550
     * @return the string value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
    private String getStringValue() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
        if (myStringValue == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
            myStringValue = myMimeType + "; class=\"" + myClassName + "\"";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
        return myStringValue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
     * Write the instance to a stream (ie serialize the object).
26754
317ece99e83d 8054877: javadoc issues in javax.print
yan
parents: 25859
diff changeset
   561
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   562
     * @param  s the output stream
26754
317ece99e83d 8054877: javadoc issues in javax.print
yan
parents: 25859
diff changeset
   563
     * @throws IOException if I/O errors occur while writing to the underlying
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   564
     *         stream
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
    private void writeObject(ObjectOutputStream s) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
        s.defaultWriteObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
        s.writeObject(myMimeType.getMimeType());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
     * Reconstitute an instance from a stream (that is, deserialize it).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   575
     * @param  s the input stream
26754
317ece99e83d 8054877: javadoc issues in javax.print
yan
parents: 25859
diff changeset
   576
     * @throws ClassNotFoundException if the class of a serialized object could
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   577
     *         not be found
26754
317ece99e83d 8054877: javadoc issues in javax.print
yan
parents: 25859
diff changeset
   578
     * @throws IOException if I/O errors occur while reading from the underlying
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   579
     *         stream
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   580
     * @serialData The serialised form of a {@code DocFlavor} is the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   581
     *             {@code String} naming the representation class followed by
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   582
     *             the {@code String} representing the canonical form of the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   583
     *             mime type
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
    private void readObject(ObjectInputStream s)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
        throws ClassNotFoundException, IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
        s.defaultReadObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
        myMimeType = new MimeType((String)s.readObject());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   593
     * Class {@code DocFlavor.BYTE_ARRAY} provides predefined static constant
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   594
     * {@code DocFlavor} objects for example doc flavors using a byte array
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   595
     * ({@code byte[]}) as the print data representation class.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   597
     * @author Alan Kaminsky
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
    public static class BYTE_ARRAY extends DocFlavor {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   601
        /**
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   602
         * Use serialVersionUID from JDK 1.4 for interoperability.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   603
         */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
        private static final long serialVersionUID = -9065578006593857475L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   607
         * Constructs a new doc flavor with the given MIME type and a print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   608
         * representation class name of {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
         *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   610
         * @param  mimeType MIME media type string
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   611
         * @throws NullPointerException if {@code mimeType} is {@code null}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   612
         * @throws IllegalArgumentException if {@code mimeType} does not obey
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   613
         *         the syntax for a MIME media type string
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
        public BYTE_ARRAY (String mimeType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
            super (mimeType, "[B");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   620
         * Doc flavor with MIME type = {@code "text/plain"}, encoded in the host
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   621
         * platform encoding. See {@link DocFlavor#hostEncoding hostEncoding}.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   622
         * Print data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
        public static final BYTE_ARRAY TEXT_PLAIN_HOST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
            new BYTE_ARRAY ("text/plain; charset="+hostEncoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   628
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-8"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   629
         * print data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
        public static final BYTE_ARRAY TEXT_PLAIN_UTF_8 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
            new BYTE_ARRAY ("text/plain; charset=utf-8");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   635
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   636
         * print data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
        public static final BYTE_ARRAY TEXT_PLAIN_UTF_16 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
            new BYTE_ARRAY ("text/plain; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   642
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16be"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   643
         * (big-endian byte ordering), print data representation class name =
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   644
         * {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
        public static final BYTE_ARRAY TEXT_PLAIN_UTF_16BE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
            new BYTE_ARRAY ("text/plain; charset=utf-16be");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   650
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16le"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   651
         * (little-endian byte ordering), print data representation class name =
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   652
         * {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
        public static final BYTE_ARRAY TEXT_PLAIN_UTF_16LE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
            new BYTE_ARRAY ("text/plain; charset=utf-16le");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   658
         * Doc flavor with MIME type = {@code "text/plain; charset=us-ascii"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   659
         * print data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
        public static final BYTE_ARRAY TEXT_PLAIN_US_ASCII =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
            new BYTE_ARRAY ("text/plain; charset=us-ascii");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   666
         * Doc flavor with MIME type = {@code "text/html"}, encoded in the host
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   667
         * platform encoding. See {@link DocFlavor#hostEncoding hostEncoding}.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   668
         * Print data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
        public static final BYTE_ARRAY TEXT_HTML_HOST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
            new BYTE_ARRAY ("text/html; charset="+hostEncoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   674
         * Doc flavor with MIME type = {@code "text/html; charset=utf-8"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   675
         * data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
        public static final BYTE_ARRAY TEXT_HTML_UTF_8 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
            new BYTE_ARRAY ("text/html; charset=utf-8");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   681
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   682
         * print data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
        public static final BYTE_ARRAY TEXT_HTML_UTF_16 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
            new BYTE_ARRAY ("text/html; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   688
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16be"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   689
         * (big-endian byte ordering), print data representation class name =
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   690
         * {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
        public static final BYTE_ARRAY TEXT_HTML_UTF_16BE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
            new BYTE_ARRAY ("text/html; charset=utf-16be");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   696
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16le"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   697
         * (little-endian byte ordering), print data representation class name =
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   698
         * {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
        public static final BYTE_ARRAY TEXT_HTML_UTF_16LE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
            new BYTE_ARRAY ("text/html; charset=utf-16le");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   704
         * Doc flavor with MIME type = {@code "text/html; charset=us-ascii"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   705
         * print data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
        public static final BYTE_ARRAY TEXT_HTML_US_ASCII =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
            new BYTE_ARRAY ("text/html; charset=us-ascii");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   712
         * Doc flavor with MIME type = {@code "application/pdf"}, print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   713
         * representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
        public static final BYTE_ARRAY PDF = new BYTE_ARRAY ("application/pdf");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   718
         * Doc flavor with MIME type = {@code "application/postscript"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   719
         * data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
        public static final BYTE_ARRAY POSTSCRIPT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
            new BYTE_ARRAY ("application/postscript");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   725
         * Doc flavor with MIME type = {@code "application/vnd.hp-PCL"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   726
         * data representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
        public static final BYTE_ARRAY PCL =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
            new BYTE_ARRAY ("application/vnd.hp-PCL");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   732
         * Doc flavor with MIME type = {@code "image/gif"}, print data
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   733
         * representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
        public static final BYTE_ARRAY GIF = new BYTE_ARRAY ("image/gif");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   738
         * Doc flavor with MIME type = {@code "image/jpeg"}, print data
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   739
         * representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
        public static final BYTE_ARRAY JPEG = new BYTE_ARRAY ("image/jpeg");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   744
         * Doc flavor with MIME type = {@code "image/png"}, print data
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   745
         * representation class name = {@code "[B"} (byte array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
        public static final BYTE_ARRAY PNG = new BYTE_ARRAY ("image/png");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   750
         * Doc flavor with MIME type = {@code "application/octet-stream"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   751
         * data representation class name = {@code "[B"} (byte array). The
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   752
         * client must determine that data described using this
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   753
         * {@code DocFlavor} is valid for the printer.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
        public static final BYTE_ARRAY AUTOSENSE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
            new BYTE_ARRAY ("application/octet-stream");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   760
     * Class {@code DocFlavor.INPUT_STREAM} provides predefined static constant
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   761
     * {@code DocFlavor} objects for example doc flavors using a byte stream
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   762
     * ({@link java.io.InputStream java.io.InputStream}) as the print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   763
     * representation class.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   765
     * @author Alan Kaminsky
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
    public static class INPUT_STREAM extends DocFlavor {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   769
        /**
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   770
         * Use serialVersionUID from JDK 1.4 for interoperability.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   771
         */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
        private static final long serialVersionUID = -7045842700749194127L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   775
         * Constructs a new doc flavor with the given MIME type and a print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   776
         * representation class name of {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   777
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
         *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   779
         * @param  mimeType MIME media type string
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   780
         * @throws NullPointerException if {@code mimeType} is {@code null}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   781
         * @throws IllegalArgumentException if {@code mimeType} does not obey
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   782
         *         the syntax for a MIME media type string.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
        public INPUT_STREAM (String mimeType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
            super (mimeType, "java.io.InputStream");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   789
         * Doc flavor with MIME type = {@code "text/plain"}, encoded in the host
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   790
         * platform encoding. See {@link DocFlavor#hostEncoding hostEncoding}.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   791
         * Print data representation class name = {@code "java.io.InputStream"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   792
         * (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
        public static final INPUT_STREAM TEXT_PLAIN_HOST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
            new INPUT_STREAM ("text/plain; charset="+hostEncoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   798
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-8"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   799
         * print data representation class name = {@code "java.io.InputStream"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   800
         * (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
        public static final INPUT_STREAM TEXT_PLAIN_UTF_8 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
            new INPUT_STREAM ("text/plain; charset=utf-8");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   806
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   807
         * print data representation class name = {@code "java.io.InputStream"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   808
         * (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
        public static final INPUT_STREAM TEXT_PLAIN_UTF_16 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
            new INPUT_STREAM ("text/plain; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   814
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16be"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   815
         * (big-endian byte ordering), print data representation class name =
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   816
         * {@code "java.io.InputStream"} (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
        public static final INPUT_STREAM TEXT_PLAIN_UTF_16BE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
            new INPUT_STREAM ("text/plain; charset=utf-16be");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   822
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16le"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   823
         * (little-endian byte ordering), print data representation class name =
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   824
         * {@code "java.io.InputStream"} (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
        public static final INPUT_STREAM TEXT_PLAIN_UTF_16LE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
            new INPUT_STREAM ("text/plain; charset=utf-16le");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   830
         * Doc flavor with MIME type = {@code "text/plain; charset=us-ascii"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   831
         * print data representation class name = {@code "java.io.InputStream"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   832
         * (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
        public static final INPUT_STREAM TEXT_PLAIN_US_ASCII =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
                new INPUT_STREAM ("text/plain; charset=us-ascii");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   838
         * Doc flavor with MIME type = {@code "text/html"}, encoded in the host
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   839
         * platform encoding. See {@link DocFlavor#hostEncoding hostEncoding}.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   840
         * Print data representation class name = {@code "java.io.InputStream"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   841
         * (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
        public static final INPUT_STREAM TEXT_HTML_HOST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
            new INPUT_STREAM ("text/html; charset="+hostEncoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   847
         * Doc flavor with MIME type = {@code "text/html; charset=utf-8"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   848
         * data representation class name = {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   849
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
        public static final INPUT_STREAM TEXT_HTML_UTF_8 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
            new INPUT_STREAM ("text/html; charset=utf-8");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   855
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   856
         * print data representation class name = {@code "java.io.InputStream"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   857
         * (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
        public static final INPUT_STREAM TEXT_HTML_UTF_16 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
            new INPUT_STREAM ("text/html; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   863
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16be"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   864
         * (big-endian byte ordering), print data representation class name =
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   865
         * {@code "java.io.InputStream"} (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
        public static final INPUT_STREAM TEXT_HTML_UTF_16BE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
            new INPUT_STREAM ("text/html; charset=utf-16be");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   871
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16le"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   872
         * (little-endian byte ordering), print data representation class name =
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   873
         * {@code "java.io.InputStream"} (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
        public static final INPUT_STREAM TEXT_HTML_UTF_16LE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
            new INPUT_STREAM ("text/html; charset=utf-16le");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   879
         * Doc flavor with MIME type = {@code "text/html; charset=us-ascii"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   880
         * print data representation class name = {@code "java.io.InputStream"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   881
         * (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
        public static final INPUT_STREAM TEXT_HTML_US_ASCII =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
            new INPUT_STREAM ("text/html; charset=us-ascii");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   887
         * Doc flavor with MIME type = {@code "application/pdf"}, print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   888
         * representation class name = {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   889
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
        public static final INPUT_STREAM PDF = new INPUT_STREAM ("application/pdf");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   894
         * Doc flavor with MIME type = {@code "application/postscript"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   895
         * data representation class name = {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   896
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
        public static final INPUT_STREAM POSTSCRIPT =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
            new INPUT_STREAM ("application/postscript");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   902
         * Doc flavor with MIME type = {@code "application/vnd.hp-PCL"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   903
         * data representation class name = {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   904
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
        public static final INPUT_STREAM PCL =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
            new INPUT_STREAM ("application/vnd.hp-PCL");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   910
         * Doc flavor with MIME type = {@code "image/gif"}, print data
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   911
         * representation class name = {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   912
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
        public static final INPUT_STREAM GIF = new INPUT_STREAM ("image/gif");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   917
         * Doc flavor with MIME type = {@code "image/jpeg"}, print data
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   918
         * representation class name = {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   919
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
        public static final INPUT_STREAM JPEG = new INPUT_STREAM ("image/jpeg");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
90ce3da70b43 Initial load
duke
parents:
diff changeset
   923
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   924
         * Doc flavor with MIME type = {@code "image/png"}, print data
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   925
         * representation class name = {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   926
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
        public static final INPUT_STREAM PNG = new INPUT_STREAM ("image/png");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   931
         * Doc flavor with MIME type = {@code "application/octet-stream"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   932
         * data representation class name = {@code "java.io.InputStream"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   933
         * stream). The client must determine that data described using this
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   934
         * {@code DocFlavor} is valid for the printer.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   936
        public static final INPUT_STREAM AUTOSENSE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
            new INPUT_STREAM ("application/octet-stream");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   939
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   941
     * Class {@code DocFlavor.URL} provides predefined static constant
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   942
     * {@code DocFlavor} objects. For example doc flavors using a Uniform
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   943
     * Resource Locator ({@link java.net.URL java.net.URL}) as the print data
25770
d132697706ea 8037511: Tidy warnings cleanup for java.awt - 2d part
avstepan
parents: 25093
diff changeset
   944
     * representation class.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   946
     * @author Alan Kaminsky
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   948
    public static class URL extends DocFlavor {
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   949
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   950
        /**
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   951
         * Use serialVersionUID from JDK 1.4 for interoperability.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   952
         */
22950
8d8e9ffdf855 8034050: Fix serial lint warnings in javax.print
darcy
parents: 22584
diff changeset
   953
        private static final long serialVersionUID = 2936725788144902062L;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   956
         * Constructs a new doc flavor with the given MIME type and a print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   957
         * representation class name of {@code "java.net.URL"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
         *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   959
         * @param  mimeType MIME media type string
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   960
         * @throws NullPointerException if {@code mimeType} is {@code null}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   961
         * @throws IllegalArgumentException if {@code mimeType} does not obey
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   962
         *         the syntax for a MIME media type string
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
        public URL (String mimeType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
            super (mimeType, "java.net.URL");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   967
90ce3da70b43 Initial load
duke
parents:
diff changeset
   968
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   969
         * Doc flavor with MIME type = {@code "text/plain"}, encoded in the host
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   970
         * platform encoding. See {@link DocFlavor#hostEncoding hostEncoding}.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   971
         * Print data representation class name = {@code "java.net.URL"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   972
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   973
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
        public static final URL TEXT_PLAIN_HOST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
            new URL ("text/plain; charset="+hostEncoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   978
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-8"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   979
         * print data representation class name = {@code "java.net.URL"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   980
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   981
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
        public static final URL TEXT_PLAIN_UTF_8 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
            new URL ("text/plain; charset=utf-8");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   986
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   987
         * print data representation class name = {@code java.net.URL""} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   988
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
        public static final URL TEXT_PLAIN_UTF_16 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
            new URL ("text/plain; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   994
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16be"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
   995
         * (big-endian byte ordering), print data representation class name =
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
   996
         * {@code "java.net.URL"} (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
        public static final URL TEXT_PLAIN_UTF_16BE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
            new URL ("text/plain; charset=utf-16be");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1001
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1002
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16le"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1003
         * (little-endian byte ordering), print data representation class name =
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1004
         * {@code "java.net.URL"} (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1006
        public static final URL TEXT_PLAIN_UTF_16LE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1007
            new URL ("text/plain; charset=utf-16le");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1008
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1010
         * Doc flavor with MIME type = {@code "text/plain; charset=us-ascii"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1011
         * print data representation class name = {@code "java.net.URL"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1012
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
        public static final URL TEXT_PLAIN_US_ASCII =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
            new URL ("text/plain; charset=us-ascii");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1018
         * Doc flavor with MIME type = {@code "text/html"}, encoded in the host
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1019
         * platform encoding. See {@link DocFlavor#hostEncoding hostEncoding}.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1020
         * Print data representation class name = {@code "java.net.URL"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1021
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
        public static final URL TEXT_HTML_HOST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
            new URL ("text/html; charset="+hostEncoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1027
         * Doc flavor with MIME type = {@code "text/html; charset=utf-8"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1028
         * data representation class name = {@code "java.net.URL"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1029
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
        public static final URL TEXT_HTML_UTF_8 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
            new URL ("text/html; charset=utf-8");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1033
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1035
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1036
         * print data representation class name = {@code "java.net.URL"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1037
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1038
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1039
        public static final URL TEXT_HTML_UTF_16 =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1040
            new URL ("text/html; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1041
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1042
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1043
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16be"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1044
         * (big-endian byte ordering), print data representation class name =
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1045
         * {@code "java.net.URL"} (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1046
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1047
        public static final URL TEXT_HTML_UTF_16BE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1048
            new URL ("text/html; charset=utf-16be");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1049
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1050
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1051
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16le"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1052
         * (little-endian byte ordering), print data representation class name =
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1053
         * {@code "java.net.URL"} (byte stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1054
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1055
        public static final URL TEXT_HTML_UTF_16LE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1056
            new URL ("text/html; charset=utf-16le");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1057
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1058
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1059
         * Doc flavor with MIME type = {@code "text/html; charset=us-ascii"},
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1060
         * print data representation class name = {@code "java.net.URL"} (byte
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1061
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1062
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1063
        public static final URL TEXT_HTML_US_ASCII =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1064
            new URL ("text/html; charset=us-ascii");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1065
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1066
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1067
         * Doc flavor with MIME type = {@code "application/pdf"}, print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1068
         * representation class name = {@code "java.net.URL"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1069
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1070
        public static final URL PDF = new URL ("application/pdf");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1071
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1072
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1073
         * Doc flavor with MIME type = {@code "application/postscript"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1074
         * data representation class name = {@code "java.net.URL"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1075
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1076
        public static final URL POSTSCRIPT = new URL ("application/postscript");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1077
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1078
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1079
         * Doc flavor with MIME type = {@code "application/vnd.hp-PCL"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1080
         * data representation class name = {@code "java.net.URL"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1081
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1082
        public static final URL PCL = new URL ("application/vnd.hp-PCL");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1083
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1084
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1085
         * Doc flavor with MIME type = {@code "image/gif"}, print data
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1086
         * representation class name = {@code "java.net.URL"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1087
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1088
        public static final URL GIF = new URL ("image/gif");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1089
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1090
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1091
         * Doc flavor with MIME type = {@code "image/jpeg"}, print data
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1092
         * representation class name = {@code "java.net.URL"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1093
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1094
        public static final URL JPEG = new URL ("image/jpeg");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1095
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1096
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1097
         * Doc flavor with MIME type = {@code "image/png"}, print data
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1098
         * representation class name = {@code "java.net.URL"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1099
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1100
        public static final URL PNG = new URL ("image/png");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1101
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1102
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1103
         * Doc flavor with MIME type = {@code "application/octet-stream"}, print
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1104
         * data representation class name = {@code "java.net.URL"}. The client
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1105
         * must determine that data described using this {@code DocFlavor} is
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1106
         * valid for the printer.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1107
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1108
        public static final URL AUTOSENSE = new URL ("application/octet-stream");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1109
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1110
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1111
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1112
     * Class {@code DocFlavor.CHAR_ARRAY} provides predefined static constant
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1113
     * {@code DocFlavor} objects for example doc flavors using a character array
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1114
     * ({@code char[]}) as the print data representation class. As such, the
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1115
     * character set is Unicode.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1116
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1117
     * @author Alan Kaminsky
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1118
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1119
    public static class CHAR_ARRAY extends DocFlavor {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1120
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1121
        /**
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1122
         * Use serialVersionUID from JDK 1.4 for interoperability.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1123
         */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1124
        private static final long serialVersionUID = -8720590903724405128L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1125
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1126
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1127
         * Constructs a new doc flavor with the given MIME type and a print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1128
         * representation class name of {@code "[C"} (character array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1129
         *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1130
         * @param  mimeType MIME media type string. If it is a text media type,
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1131
         *         it is assumed to contain a {@code "charset=utf-16"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1132
         *         parameter.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1133
         * @throws NullPointerException if {@code mimeType} is {@code null}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1134
         * @throws IllegalArgumentException if {@code mimeType} does not obey
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1135
         *         the syntax for a MIME media type string
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1136
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1137
        public CHAR_ARRAY (String mimeType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1138
            super (mimeType, "[C");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1139
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1140
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1141
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1142
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16"},
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1143
         * print data representation class name = {@code "[C"} (character
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1144
         * array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1145
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1146
        public static final CHAR_ARRAY TEXT_PLAIN =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1147
            new CHAR_ARRAY ("text/plain; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1148
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1149
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1150
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16"},
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1151
         * print data representation class name = {@code "[C"} (character
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1152
         * array).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1153
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1154
        public static final CHAR_ARRAY TEXT_HTML =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1155
            new CHAR_ARRAY ("text/html; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1156
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1157
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1158
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1159
     * Class {@code DocFlavor.STRING} provides predefined static constant
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1160
     * {@code DocFlavor} objects for example doc flavors using a string
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1161
     * ({@link String java.lang.String}) as the print data representation class.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1162
     * As such, the character set is Unicode.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1163
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1164
     * @author Alan Kaminsky
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1165
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1166
    public static class STRING extends DocFlavor {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1167
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1168
        /**
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1169
         * Use serialVersionUID from JDK 1.4 for interoperability.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1170
         */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1171
        private static final long serialVersionUID = 4414407504887034035L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1172
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1173
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1174
         * Constructs a new doc flavor with the given MIME type and a print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1175
         * representation class name of {@code "java.lang.String"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1176
         *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1177
         * @param  mimeType MIME media type string. If it is a text media type,
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1178
         *         it is assumed to contain a {@code "charset=utf-16"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1179
         *         parameter.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1180
         * @throws NullPointerException if {@code mimeType} is {@code null}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1181
         * @throws IllegalArgumentException if {@code mimeType} does not obey
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1182
         *         the syntax for a MIME media type string
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1183
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1184
        public STRING (String mimeType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1185
            super (mimeType, "java.lang.String");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1186
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1187
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1188
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1189
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16"},
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1190
         * print data representation class name = {@code "java.lang.String"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1191
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1192
        public static final STRING TEXT_PLAIN =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1193
            new STRING ("text/plain; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1194
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1195
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1196
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16"},
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1197
         * print data representation class name = {@code "java.lang.String"}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1198
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1199
        public static final STRING TEXT_HTML =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1200
            new STRING ("text/html; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1201
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1202
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1203
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1204
     * Class {@code DocFlavor.READER} provides predefined static constant
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1205
     * {@code DocFlavor} objects for example doc flavors using a character
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1206
     * stream ({@link java.io.Reader java.io.Reader}) as the print data
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1207
     * representation class. As such, the character set is Unicode.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1208
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1209
     * @author Alan Kaminsky
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1210
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1211
    public static class READER extends DocFlavor {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1212
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1213
        /**
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1214
         * Use serialVersionUID from JDK 1.4 for interoperability.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1215
         */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1216
        private static final long serialVersionUID = 7100295812579351567L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1217
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1218
        /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1219
         * Constructs a new doc flavor with the given MIME type and a print data
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1220
         * representation class name of {@code "java.io.Reader"} (character
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1221
         * stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1222
         *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1223
         * @param  mimeType MIME media type string. If it is a text media type,
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1224
         *         it is assumed to contain a {@code "charset=utf-16"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1225
         *         parameter.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1226
         * @throws NullPointerException if {@code mimeType} is {@code null}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1227
         * @throws IllegalArgumentException if {@code mimeType} does not obey
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1228
         *         the syntax for a MIME media type string
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1229
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1230
        public READER (String mimeType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1231
            super (mimeType, "java.io.Reader");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1232
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1233
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1234
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1235
         * Doc flavor with MIME type = {@code "text/plain; charset=utf-16"},
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1236
         * print data representation class name = {@code "java.io.Reader"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1237
         * (character stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1238
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1239
        public static final READER TEXT_PLAIN =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1240
            new READER ("text/plain; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1241
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1242
        /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1243
         * Doc flavor with MIME type = {@code "text/html; charset=utf-16"},
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1244
         * print data representation class name = {@code "java.io.Reader"}
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1245
         * (character stream).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1246
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1247
        public static final READER TEXT_HTML =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1248
            new READER ("text/html; charset=utf-16");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1249
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1250
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1251
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1252
    /**
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1253
     * Class {@code DocFlavor.SERVICE_FORMATTED} provides predefined static
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1254
     * constant {@code DocFlavor} objects for example doc flavors for service
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1255
     * formatted print data.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1256
     *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1257
     * @author Alan Kaminsky
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1258
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1259
    public static class SERVICE_FORMATTED extends DocFlavor {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1260
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1261
        /**
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1262
         * Use serialVersionUID from JDK 1.4 for interoperability.
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1263
         */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1264
        private static final long serialVersionUID = 6181337766266637256L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1265
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1266
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1267
         * Constructs a new doc flavor with a MIME type of
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1268
         * {@code "application/x-java-jvm-local-objectref"} indicating service
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1269
         * formatted print data and the given print data representation class
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1270
         * name.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1271
         *
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1272
         * @param  className fully-qualified representation class name
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1273
         * @throws NullPointerException if {@code className} is {@code null}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1274
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1275
        public SERVICE_FORMATTED (String className) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1276
            super ("application/x-java-jvm-local-objectref", className);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1277
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1278
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1279
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1280
         * Service formatted print data doc flavor with print data
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1281
         * representation class name =
47196
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1282
         * {@code "java.awt.image.renderable.RenderableImage"} (renderable image
a3211bb4daff 8184435: Cleanup of javadoc in javax.print package
serb
parents: 45648
diff changeset
  1283
         * object).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1284
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1285
        public static final SERVICE_FORMATTED RENDERABLE_IMAGE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1286
            new SERVICE_FORMATTED("java.awt.image.renderable.RenderableImage");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1287
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1288
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1289
         * Service formatted print data doc flavor with print data
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1290
         * representation class name = {@code "java.awt.print.Printable"}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1291
         * (printable object).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1292
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1293
        public static final SERVICE_FORMATTED PRINTABLE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1294
            new SERVICE_FORMATTED ("java.awt.print.Printable");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1295
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1296
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1297
         * Service formatted print data doc flavor with print data
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 26754
diff changeset
  1298
         * representation class name = {@code "java.awt.print.Pageable"}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1299
         * (pageable object).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1300
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1301
        public static final SERVICE_FORMATTED PAGEABLE =
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1302
            new SERVICE_FORMATTED ("java.awt.print.Pageable");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1303
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1304
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1305
}