Build 1.0_r1(from source)

android.webkit
Class ContentLoader

java.lang.Object
  extended by android.os.Handler
      extended by android.webkit.StreamLoader
          extended by android.webkit.ContentLoader

 class ContentLoader
extends StreamLoader

This class is a concrete implementation of StreamLoader that loads "content:" URIs


Field Summary
 
Fields inherited from class android.webkit.StreamLoader
mContentLength, mDataStream, mHandler, NO_STORE
 
Constructor Summary
ContentLoader(String rawUrl, LoadListener loadListener, Context context)
          Construct a ContentLoader with the specified content URI
 
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.webkit.StreamLoader
handleMessage, load
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 to
context - Context to use to access the asset.
Method Detail

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 loaded
loadListener - LoadListener to pass the content to
context - Context to use to access the asset.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature