1. /*
  2. * @(#)ContentHandlerFactory.java 1.9 00/02/02
  3. *
  4. * Copyright 1995-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.net;
  11. /**
  12. * This interface defines a factory for content handlers. An
  13. * implementation of this interface should map a MIME type into an
  14. * instance of <code>ContentHandler</code>.
  15. * <p>
  16. * This interface is used by the <code>URLStreamHandler</code> class
  17. * to create a <code>ContentHandler</code> for a MIME type.
  18. *
  19. * @author James Gosling
  20. * @version 1.9, 02/02/00
  21. * @see java.net.ContentHandler
  22. * @see java.net.URLStreamHandler
  23. * @since JDK1.0
  24. */
  25. public interface ContentHandlerFactory {
  26. /**
  27. * Creates a new <code>ContentHandler</code> to read an object from
  28. * a <code>URLStreamHandler</code>.
  29. *
  30. * @param mimetype the MIME type for which a content handler is desired.
  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. }