PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|Code_Examples|Java|javax|print|DocFlavor.java =

page 7 of 15



     * Write the instance to a stream (ie serialize the object).
     */
    private void writeObject(ObjectOutputStream s) throws IOException {

	s.defaultWriteObject();
	s.writeObject(myMimeType.getMimeType());
    }

    /**
     * Reconstitute an instance from a stream (that is, deserialize it).
     *
     * @serialData
     * The serialised form of a DocFlavor is the String naming the
     * representation class followed by the String representing the canonical
     * form of the mime type.
     */
    private void readObject(ObjectInputStream s)
	throws ClassNotFoundException, IOException {
	
	s.defaultReadObject();
	myMimeType = new MimeType((String)s.readObject());	
    }

    /**
     * Class DocFlavor.BYTE_ARRAY provides predefined static constant
     * DocFlavor objects for example doc flavors using a byte array
     * (<CODE>byte[]</CODE>) as the print data representation class. 
     * <P>
     *
     * @author  Alan Kaminsky
     */
    public static class BYTE_ARRAY extends DocFlavor {

	private static final long serialVersionUID = -9065578006593857475L;

    	/**
    	 * Constructs a new doc flavor with the given MIME type and a print 
    	 * data representation class name of <CODE>"[B"</CODE> (byte array). 
    	 *
    	 * @param  mimeType   MIME media type string.
    	 *
    	 * @exception  NullPointerException
    	 *     (unchecked exception) Thrown if <CODE>mimeType</CODE> is null. 
    	 * @exception  IllegalArgumentException
    	 *     (unchecked exception) Thrown if <CODE>mimeType</CODE> does not 
    	 *     obey the syntax for a MIME media type string. 
    	 */
    	public BYTE_ARRAY (String mimeType) {
	    super (mimeType, "[B");
	}

    	/**
    	 * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
	 * encoded in the host platform encoding.
	 * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
    	 * Print data representation class name =
	 * <CODE>"[B"</CODE> (byte array). 
    	 */
    	public static final BYTE_ARRAY TEXT_PLAIN_HOST =
	    new BYTE_ARRAY ("text/plain; charset="+hostEncoding);

    	/**
    	 * Doc flavor with MIME type =
	 * <CODE>"text/plain; charset=utf-8"</CODE>, 
    	 * print data representation class name = <CODE>"[B"</CODE> (byte 
    	 * array). 
    	 */
    	public static final BYTE_ARRAY TEXT_PLAIN_UTF_8 =
	    new BYTE_ARRAY ("text/plain; charset=utf-8");

   	/**
    	 * Doc flavor with MIME type =
	 * <CODE>"text/plain; charset=utf-16"</CODE>,
    	 * print data representation class name = <CODE>"[B"</CODE> (byte 
    	 * array). 
    	 */
    	public static final BYTE_ARRAY TEXT_PLAIN_UTF_16 =
	    new BYTE_ARRAY ("text/plain; charset=utf-16");


   	/**
    	 * Doc flavor with MIME type =
	 * <CODE>"text/plain; charset=utf-16be"</CODE>
	 * (big-endian byte ordering), 
    	 * print data representation class name = <CODE>"[B"</CODE> (byte 
    	 * array). 
    	 */
    	public static final BYTE_ARRAY TEXT_PLAIN_UTF_16BE =
	    new BYTE_ARRAY ("text/plain; charset=utf-16be");

   	/**
    	 * Doc flavor with MIME type =
	 * <CODE>"text/plain; charset=utf-16le"</CODE>
	 * (little-endian byte ordering), 
    	 * print data representation class name = <CODE>"[B"</CODE> (byte 
    	 * array). 
    	 */
    	public static final BYTE_ARRAY TEXT_PLAIN_UTF_16LE =
	    new BYTE_ARRAY ("text/plain; charset=utf-16le");

=7=

1|2|3|4|5|6| < PREV = PAGE 7 = NEXT > |8|9|10|11|12|13|14|15

UP TO ROOT | UP TO DIR | TO FIRST PAGE

Google
 


E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.01138 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU)