鴻蒙OS ContentHandlerFactory

2022-06-06 16:35 更新

ContentHandlerFactory

public interface ContentHandlerFactory

該接口為內容處理程序定義了一個工廠。 此接口的實現應將 MIME 類型映射到 ContentHandler 的實例。

URLStreamHandler 類使用此接口為 MIME 類型創(chuàng)建 ContentHandler。

方法總結

修飾符和類型 方法 描述
ContentHandler createContentHandler(String mimetype) 創(chuàng)建一個新的 ContentHandler 以從 URLStreamHandler 讀取對象。

方法詳情

createContentHandler

ContentHandler createContentHandler(String mimetype)

創(chuàng)建一個新的 ContentHandler 以從 URLStreamHandler 讀取對象。

參數:

參數名稱 參數描述
mimetype 需要內容處理程序的 MIME 類型。

返回:

一個新的 ContentHandler 從 URLStreamHandler 讀取對象。

以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號