private void readPackageList ( InputStream input , String path , boolean relative ) throws IOException { try ( BufferedReader in = new BufferedReader ( new InputStreamReader ( input ) ) ) { StringBuilder strbuf = new StringBuilder ( ) ; int c ; while ( ( c = in . read ( ) ) >= 0 ) { char ch = ( char ) c ; if ( ch == ' ' || ch == ' ' ) { if ( strbuf . length ( ) > 0 ) { String packname = strbuf . toString ( ) ; String packpath = path + packname . replace ( ' ' , ' ' ) + ' ' ; Item ignore = new Item ( packname , packpath , relative ) ; strbuf . setLength ( 0 ) ; } } else { strbuf . append ( ch ) ; } } } }
Read the file package - list and for each package name found create Extern object and associate it with the package name in the map .