FileDocCategorySizeDatePackage
FileContentProvider.javaAPI DocAndroid 1.5 API2787Wed May 06 22:42:46 BST 2009com.android.htmlviewer

FileContentProvider

public class FileContentProvider extends android.content.ContentProvider
WebView does not support file: loading. This class wraps a file load with a content provider. As HTMLViewer does not have internet access nor does it allow Javascript to be run, it is safe to load file based HTML content.

Fields Summary
public static final String
BASE_URI
public static final int
BASE_URI_LEN
Constructors Summary
Methods Summary
public intdelete(android.net.Uri uri, java.lang.String selection, java.lang.String[] selectionArgs)

        throw new UnsupportedOperationException();
    
public java.lang.StringgetType(android.net.Uri uri)


    
        
        // If the mimetype is not appended to the uri, then return an empty string
        String mimetype = uri.getQuery();
        return mimetype == null ? "" : mimetype;
    
public android.net.Uriinsert(android.net.Uri uri, android.content.ContentValues values)

        throw new UnsupportedOperationException();
    
public booleanonCreate()

        return true;
    
public android.os.ParcelFileDescriptoropenFile(android.net.Uri uri, java.lang.String mode)

        if (!"r".equals(mode)) {
            throw new FileNotFoundException("Bad mode for " + uri + ": " + mode);
        }
        String filename = uri.toString().substring(BASE_URI_LEN);
        return ParcelFileDescriptor.open(new File(filename),
            ParcelFileDescriptor.MODE_READ_ONLY);
    
public android.database.Cursorquery(android.net.Uri uri, java.lang.String[] projection, java.lang.String selection, java.lang.String[] selectionArgs, java.lang.String sortOrder)

        throw new UnsupportedOperationException();
    
public intupdate(android.net.Uri uri, android.content.ContentValues values, java.lang.String selection, java.lang.String[] selectionArgs)

        throw new UnsupportedOperationException();