Stay organized with collections
Save and categorize content based on your preferences.
ContentHandlerFactory
interface ContentHandlerFactory
This interface defines a factory for content handlers. An implementation of this interface should map a MIME type into an instance of ContentHandler
.
This interface is used by the URLStreamHandler
class to create a ContentHandler
for a MIME type.
Summary
Public methods |
abstract ContentHandler! |
Creates a new ContentHandler to read an object from a URLStreamHandler .
|
Public methods
createContentHandler
abstract fun createContentHandler(mimetype: String!): ContentHandler!
Creates a new ContentHandler
to read an object from a URLStreamHandler
.
Parameters |
mimetype |
String!: the MIME type for which a content handler is desired. |
Return |
ContentHandler! |
a new ContentHandler to read an object from a URLStreamHandler . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ContentHandlerFactory\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nContentHandlerFactory\n=====================\n\n```\ninterface ContentHandlerFactory\n```\n\n|-------------------------------------|\n| [java.net.ContentHandlerFactory](#) |\n\nThis interface defines a factory for content handlers. An implementation of this interface should map a MIME type into an instance of `ContentHandler`.\n\nThis interface is used by the `URLStreamHandler` class to create a `ContentHandler` for a MIME type.\n\nSummary\n-------\n\n| Public methods ||\n|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [ContentHandler](/reference/kotlin/java/net/ContentHandler)! | [createContentHandler](#createContentHandler(kotlin.String))`(`mimetype:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Creates a new `ContentHandler` to read an object from a `URLStreamHandler`. |\n\nPublic methods\n--------------\n\n### createContentHandler\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun createContentHandler(mimetype: String!): ContentHandler!\n```\n\nCreates a new `ContentHandler` to read an object from a `URLStreamHandler`.\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| `mimetype` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the MIME type for which a content handler is desired. |\n\n| Return ||\n|--------------------------------------------------------------|---------------------------------------------------------------------|\n| [ContentHandler](/reference/kotlin/java/net/ContentHandler)! | a new `ContentHandler` to read an object from a `URLStreamHandler`. |\n\n**See Also**\n\n- [java.net.ContentHandler](/reference/kotlin/java/net/ContentHandler)\n- [java.net.URLStreamHandler](/reference/kotlin/java/net/URLStreamHandler)"]]