Code example for BufferedReader

Methods: close

0
 
    @Override 
    protected DiscoverInfo load(String ver) {
	File fver = new File(mCacheDir, ver);
	try { 
	    Reader fr = new BufferedReader(new FileReader(fver));
	    try { 
		if (mParser == null)
		    mParser = makeParser();
		mParser.setInput(fr);
		return (DiscoverInfo) PacketParserUtils.parsePacketExtension("query", 
			"http://jabber.org/protocol/disco#info", mParser);
 
	    } finally { 
		fr.close();
	    } 
	} catch (Exception e) {
	    // The parsePacketExtension throw Exception on error 
	    Log.d(TAG, "Error while loading Capabilities " + ver, e);
	} 
	return null;