Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ContentHandler

public abstract class ContentHandler
extends Object

java.lang.Object
   ↳ java.net.ContentHandler


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.

See also:

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.

Inherited methods

From class java.lang.Object

Public constructors

ContentHandler

Added in API level 1
ContentHandler ()

Public methods

getContent

Added in API level 1
Object getContent (URLConnection uConn, 
                Class[] types)

Returns the object pointed by the specified URL connection uConn.

Parameters
uConn URLConnection: URL connection that points to the desired object.
types Class: list of acceptable content types.
Returns
Object 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.

getContent

Added in API level 1
Object getContent (URLConnection uConn)

Returns the object pointed by the specified URL connection uConn.

Parameters
uConn URLConnection: URL connection that points to the desired object.
Returns
Object object referred by uConn.
Throws
IOException if an IO error occurs during the retrieval of the object
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.