Spread the love

Abstract Interface ContentHandlerFactory in Java

Spread the love

Abstract Interface ContentHandlerFactory in Java

ContentHandlerFactory interface defines a method that creates and returns an appropriate ContentHandler object for a specified MIME type. A system-wide ContentHandlerFactory interface may be specified by using the URLConnection. setContentHandlerFactory() method. Normal applications never need to use or implement this interface.

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.

The MIME content-type is text/html. A ContentHandlerFactory that recognizes text/html returns a ContentHandler object that can process that kind of content.

The abstract interface structure of ContentHandlerFactory in Java is given as

public abstract interface java.net.ContentHandlerFactory{
// Public Instance Methods
public abstract ContentHandler createContentHandler(String mimetype);
}

The details of the class structure are given as follows:

public abstract ContentHandler createContentHandler(String mimetype);

public abstract ContentHandler createContentHandler(String mimetype) method creates an object of the appropriate subclass of ContentHandler that can read and process data for the given MIME type.

This method returns a ContentHandler object that can read the specified type of content.

Parameter
mimetype – A String that represents a MIME type.




Spread the love
READ  Class IncompatibleClassChangeError in Java
READ  Class InterruptedIOException in Java
Animesh Chatterjeehttps://techtravelhub.com/
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

Related Articles

Super Keyword in Java Simplified

Super Keyword Super Keyword in Java Simplified: Java defines a special keyword called...

Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent Posts

Super Keyword in Java Simplified

Super Keyword Super Keyword in Java Simplified: Java defines a special...

Learn Object Repository in UFT in An Efficient and Fast Manner

Object Repository in UFT The post will cover the following...

Learn What Primary Tools For Test Automation

Primary Tools For Test Automation According to the Gartner report...

EDITOR PICKS


Spread the love