1 /* 2 * @(#)ContentHandlerFactory.java 1.12 03/12/19 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 package java.net; 9 10 /** 11 * This interface defines a factory for content handlers. An 12 * implementation of this interface should map a MIME type into an 13 * instance of <code>ContentHandler</code>. 14 * <p> 15 * This interface is used by the <code>URLStreamHandler</code> class 16 * to create a <code>ContentHandler</code> for a MIME type. 17 * 18 * @author James Gosling 19 * @version 1.12, 12/19/03 20 * @see java.net.ContentHandler 21 * @see java.net.URLStreamHandler 22 * @since JDK1.0 23 */ 24 public interface ContentHandlerFactory { 25 /** 26 * Creates a new <code>ContentHandler</code> to read an object from 27 * a <code>URLStreamHandler</code>. 28 * 29 * @param mimetype the MIME type for which a content handler is desired. 30 31 * @return a new <code>ContentHandler</code> to read an object from a 32 * <code>URLStreamHandler</code>. 33 * @see java.net.ContentHandler 34 * @see java.net.URLStreamHandler 35 */ 36 ContentHandler createContentHandler(String mimetype); 37 } 38