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

Print this page




1028          * <CODE>"java.io.InputStream"</CODE> (byte stream).
1029          * The client must determine that data described
1030          * using this DocFlavor is valid for the printer.
1031          */
1032         public static final INPUT_STREAM AUTOSENSE =
1033             new INPUT_STREAM ("application/octet-stream");
1034 
1035     }
1036 
1037     /**
1038      * Class DocFlavor.URL provides predefined static constant DocFlavor
1039      * objects.
1040      * For example doc flavors using a Uniform Resource Locator ({@link
1041      * java.net.URL java.net.URL}) as the print data
1042      * representation  class.
1043      * <P>
1044      *
1045      * @author  Alan Kaminsky
1046      */
1047     public static class URL extends DocFlavor {

1048 
1049         /**
1050          * Constructs a new doc flavor with the given MIME type and a print
1051          * data representation class name of <CODE>"java.net.URL"</CODE>.
1052          *
1053          * @param  mimeType   MIME media type string.
1054          *
1055          * @exception  NullPointerException
1056          *     (unchecked exception) Thrown if <CODE>mimeType</CODE> is null.
1057          * @exception  IllegalArgumentException
1058          *     (unchecked exception) Thrown if <CODE>mimeType</CODE> does not
1059          *     obey the syntax for a MIME media type string.
1060          */
1061         public URL (String mimeType) {
1062             super (mimeType, "java.net.URL");
1063         }
1064 
1065         /**
1066          * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
1067          * encoded in the host platform encoding.




1028          * <CODE>"java.io.InputStream"</CODE> (byte stream).
1029          * The client must determine that data described
1030          * using this DocFlavor is valid for the printer.
1031          */
1032         public static final INPUT_STREAM AUTOSENSE =
1033             new INPUT_STREAM ("application/octet-stream");
1034 
1035     }
1036 
1037     /**
1038      * Class DocFlavor.URL provides predefined static constant DocFlavor
1039      * objects.
1040      * For example doc flavors using a Uniform Resource Locator ({@link
1041      * java.net.URL java.net.URL}) as the print data
1042      * representation  class.
1043      * <P>
1044      *
1045      * @author  Alan Kaminsky
1046      */
1047     public static class URL extends DocFlavor {
1048         private static final long serialVersionUID = 2936725788144902062L;
1049 
1050         /**
1051          * Constructs a new doc flavor with the given MIME type and a print
1052          * data representation class name of <CODE>"java.net.URL"</CODE>.
1053          *
1054          * @param  mimeType   MIME media type string.
1055          *
1056          * @exception  NullPointerException
1057          *     (unchecked exception) Thrown if <CODE>mimeType</CODE> is null.
1058          * @exception  IllegalArgumentException
1059          *     (unchecked exception) Thrown if <CODE>mimeType</CODE> does not
1060          *     obey the syntax for a MIME media type string.
1061          */
1062         public URL (String mimeType) {
1063             super (mimeType, "java.net.URL");
1064         }
1065 
1066         /**
1067          * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
1068          * encoded in the host platform encoding.