Code example for RandomAccessFile

Methods: closegetFD

0
		options.inPurgeable = true;
		options.inInputShareable = true;
 
		RandomAccessFile file = null;
		try { 
			file = new RandomAccessFile(imagePath, "r");
			return BitmapFactory.decodeFileDescriptor(file.getFD(), null,
					options);
		} catch (IOException e) {
			Log.d(TAG, e.getMessage(), e);
			return null; 
		} finally { 
			if (file != null)
				try { 
					file.close();
				} catch (IOException e) {
					Log.d(TAG, e.getMessage(), e);
				} 
		} 
	} 
Stop searching for code, let great code find you!  Add Codota to your java IDE