Code example for BufferedInputStream

Methods: close

1
        if (mFile.canRead()) {
        	lastModified = mFile.lastModified();
        	fileSize = mFile.length();
        	BufferedInputStream str = null;
            try { 
                str = new BufferedInputStream(
                        new FileInputStream(mFile), 16*1024);
                map = XmlUtils.readMapXml(str);
                str.close();
            } catch (XmlPullParserException e) {
                Log.w(TAG, "getSharedPreferences", e);
            } catch (IOException e) {
                Log.w(TAG, "getSharedPreferences", e);
            } finally { 
            	if (str != null) {
    	            try { 
    	                str.close();
    	            } catch (RuntimeException rethrown) {
    	                throw rethrown;
    	            } catch (Exception ignored) {
    	            } 
            	} 
Contextual code suggestions in your IDE  Get Codota for Java