java.net
Class ContentHandler

java.lang.Object
  |
  +--java.net.ContentHandler
Direct Known Subclasses:
UnknownContentHandler

public abstract class ContentHandler
extends Object

Untamed:


Constructor Summary
ContentHandler()
          Enabled:
 
Method Summary
abstract  Object getContent(URLConnection urlc)
          Enabled: Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.
 Object getContent(URLConnection urlc, Class[] classes)
          Enabled: Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentHandler

public ContentHandler()
Enabled:

Method Detail

getContent

public abstract Object getContent(URLConnection urlc)
                           throws IOException
Enabled: Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.

Parameters:
urlc - a URL connection.
Returns:
the object read by the ContentHandler.
IOException

getContent

public Object getContent(URLConnection urlc,
                         Class[] classes)
                  throws IOException
Enabled: Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified. The default implementation of this method should call getContent() and screen the return type for a match of the suggested types.

Parameters:
urlc - a URL connection.
classes - an array of types requested
Returns:
the object read by the ContentHandler that is the first match of the suggested types. null if none of the requested are supported.
IOException


comments?