java.net.ContentHandlerFactory
None
None
None
JDK 1.0 or later
The ContentHandlerFactory interface defines a method that creates and returns an appropriate ContentHandler object for a given MIME type. The interface is implemented by classes that select ContentHandler subclasses to process content.
The URLStreamHandler class uses a ContentHandlerFactory to create ContentHandler objects. The content type is usually implied by the portion of the URL following the last period. For example, given the following URL:
http://www.tolstoi.org/anna.html
the MIME content type is text/html. A ContentHandlerFactory that recognizes text/html returns a ContentHandler object that can process that kind of content.
public abstract interface java.net.ContentHandlerFactory { // Methods public abstract ContentHandler createContentHandler(String mimetype); }
public abstract ContentHandler createContentHandler( String mimetype)
A String that represents a MIME type.
A ContentHandler object that can read the specified type of content.
This method creates an object of the appropriate subclass of ContentHandler that can read and process data for the given MIME type.
ContentHandler, URLStreamHandler