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