Code example for RandomAccessFile

Methods: closegetFD

0
        options.inDither = false;
        options.inSampleSize = sampleSize;
 
        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);
                } 
        } 
    } 
Connect your IDE to all the code out there  Get Codota for Java