Code example for URI

Methods: toString

0
	{ 
		TiResponseCache rc = (TiResponseCache) TiResponseCache.getDefault();
		if (rc == null) return false;
		if (rc.cacheDir == null) return false;
		 
		String hash = DigestUtils.shaHex(uri.toString());
		File hFile = new File(rc.cacheDir, hash + HEADER_SUFFIX);
		File bFile = new File(rc.cacheDir, hash + BODY_SUFFIX);
		if (!bFile.exists() || !hFile.exists()) return false;
		return true; 
	} 
 
	public static InputStream openCachedStream(URI uri)
	{ 
		TiResponseCache rc = (TiResponseCache) TiResponseCache.getDefault();
		if (rc == null) {
			return null; 
		} 
 
		if (rc.cacheDir == null) {
			return null;