java.net
Class ContentHandler

java.lang.Object
  |
  +--java.net.ContentHandler

public abstract class ContentHandler
extends Object

A class to read data from a URLConnection and construct an Object. Specific subclasses of ContentHandler handle specific mime types. It is the responsibility of a ContentHandlerFactory to select an appropriate ContentHandler for the mime-type of the URLConnection. Applications should never call ContentHandlers directly, rather they should use URL.getContent() or URLConnection.getContent()


Constructor Summary
ContentHandler()
           
 
Method Summary
abstract  Object getContent(URLConnection urlc)
          Given an input stream positioned at the beginning of the representation of an object, reads that stream and recreates the object from it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentHandler

public ContentHandler()
Method Detail

getContent

public abstract Object getContent(URLConnection urlc)
                           throws IOException
Given an input stream positioned at the beginning of the representation of an object, reads that stream and recreates the object from it.

Throws:
IOException - An IO error occurred while reading the object.