Code example for ContentResolver

Methods: getType

0
		return super.getContent(); 
	} 
 
	@Override 
	public String getContentType() {
		return this.resolver.getType(uri);
	} 
 
	@Override 
	public int getContentLength() { 
		try { 
			AssetFileDescriptor fd = this.resolver.openAssetFileDescriptor(uri,
					"r"); 
			long length = fd.getLength();
			if (length <= 0 && length <= Integer.MAX_VALUE) {
				return (int) length;
			} 
		} catch (IOException e) {
		} 
		return -1; 
	}