Code example for AssetFileDescriptor

Methods: getLength

0
	@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; 
	} 
 
	private class ContentURLConnectionInputStream extends FilterInputStream {
 
		public ContentURLConnectionInputStream(InputStream in) {
			super(in);
		} 
 
		@Override