android.webkit
Class ContentLoader
java.lang.Object
android.os.Handler
android.webkit.StreamLoader
android.webkit.ContentLoader
class ContentLoader
- extends StreamLoader
This class is a concrete implementation of StreamLoader that loads
"content:" URIs
|
Method Summary |
protected void |
buildHeaders(Headers headers)
This method is called when the headers are about to be sent to the
load framework. |
static void |
requestUrl(String url,
LoadListener loadListener,
Context context)
Construct a ContentLoader and instruct it to start loading. |
protected boolean |
setupStreamAndSendStatus()
This method is called when the derived class should setup mDataStream,
and call mHandler.status() to indicate that the load can occur. |
| Methods inherited from class android.os.Handler |
dispatchMessage, dump, getLooper, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString |
ContentLoader
ContentLoader(String rawUrl,
LoadListener loadListener,
Context context)
- Construct a ContentLoader with the specified content URI
- Parameters:
rawUrl - "content:" url pointing to content to be loaded. This url
is the same url passed in to the WebView.loadListener - LoadListener to pass the content tocontext - Context to use to access the asset.
setupStreamAndSendStatus
protected boolean setupStreamAndSendStatus()
- Description copied from class:
StreamLoader
- This method is called when the derived class should setup mDataStream,
and call mHandler.status() to indicate that the load can occur. If it
fails to setup, it should still call status() with the error code.
- Specified by:
setupStreamAndSendStatus in class StreamLoader
- Returns:
- true if stream was successfully setup
buildHeaders
protected void buildHeaders(Headers headers)
- Description copied from class:
StreamLoader
- This method is called when the headers are about to be sent to the
load framework. The derived class has the opportunity to add addition
headers.
- Specified by:
buildHeaders in class StreamLoader
- Parameters:
headers - Map of HTTP headers that will be sent to the loader.
requestUrl
public static void requestUrl(String url,
LoadListener loadListener,
Context context)
- Construct a ContentLoader and instruct it to start loading.
- Parameters:
url - "content:" url pointing to content to be loadedloadListener - LoadListener to pass the content tocontext - Context to use to access the asset.
Please submit a feedback, bug or feature