to top
Android APIs
public abstract class

ContentHandler

extends Object
java.lang.Object
   ↳ java.net.ContentHandler

Class Overview

This class converts the content of a certain format (i.e. a MIME type) into a Java type object. It is created by ContentHandlerFactory. The data values should be accessed via URL or URLConnection.

Summary

Public Constructors
ContentHandler()
Public Methods
Object getContent(URLConnection uConn, Class[] types)
Returns the object pointed by the specified URL connection uConn.
abstract Object getContent(URLConnection uConn)
Returns the object pointed by the specified URL connection uConn.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ContentHandler ()

Since: API Level 1

Public Methods

public Object getContent (URLConnection uConn, Class[] types)

Since: API Level 1

Returns the object pointed by the specified URL connection uConn.

Parameters
uConn URL connection that points to the desired object.
types list of acceptable content types.
Returns
  • resource object pointed by this URL or null if the content doesn't match one of the specified content types.
Throws
IOException if an error occurred while obtaining the content.

public abstract Object getContent (URLConnection uConn)

Since: API Level 1

Returns the object pointed by the specified URL connection uConn.

Parameters
uConn URL connection that points to the desired object.
Returns
  • object referred by uConn.
Throws
IOException if an IO error occurs during the retrieval of the object