/android/import-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/import-contacts

« back to all changes in this revision

Viewing changes to src/am/ed/importcontacts/VcardImporter.java

  • Committer: Tim Marston
  • Date: 2013-12-08 18:43:52 UTC
  • Revision ID: tim@ed.am-20131208184352-0giww6zoy58bx07h
close some streams properly

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
                                else if( line.matches( "(?i)END[ \t]*:[ \t]*VCARD.*" ) )
150
150
                                        in_vcard = false;
151
151
                        }
 
152
                        reader.close();
152
153
 
153
154
                }
154
155
                catch( FileNotFoundException e ) {
176
177
                        FileInputStream istream = new FileInputStream( file );
177
178
                        byte[] content = new byte[ (int)file.length() ];
178
179
                        istream.read( content );
179
 
                        istream = null;
 
180
                        istream.close();
180
181
 
181
182
                        // import
182
183
                        importVCardFileContent( content, file.getName() );