home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / net / ContentHandlerFactory.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.5 KB  |  46 lines

  1. /*
  2.  * @(#)ContentHandlerFactory.java    1.5 98/03/18
  3.  *
  4.  * Copyright 1995-1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.net;
  16.  
  17. /**
  18.  * This interface defines a factory for content handlers. An 
  19.  * implementation of this interface should map a MIME type into an 
  20.  * instance of <code>ContentHandler</code>. 
  21.  * <p>
  22.  * This interface is used by the <code>URLStreamHandler</code> class 
  23.  * to create a <code>ContentHandler</code> for a MIME type. 
  24.  *
  25.  * @author  James Gosling
  26.  * @version 1.5, 03/18/98
  27.  * @see     java.net.ContentHandler
  28.  * @see     java.net.URLStreamHandler
  29.  * @since   JDK1.0
  30.  */
  31. public interface ContentHandlerFactory {
  32.     /**
  33.      * Creates a new <code>ContentHandler</code> to read an object from 
  34.      * a <code>URLStreamHandler</code>. 
  35.      *
  36.      * @param   mimetype   the MIME type for which a content handler is desired.
  37.  
  38.      * @return  a new <code>ContentHandler</code> to read an object from a
  39.      *          <code>URLStreamHandler</code>.
  40.      * @see     java.net.ContentHandler
  41.      * @see     java.net.URLStreamHandler
  42.      * @since   JDK1.0
  43.      */
  44.     ContentHandler createContentHandler(String mimetype);
  45. }
  46.