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 == '\n' || ch == '\r') {
                    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);
                }
            }
        }
    }
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 == '\n' || ch == '\r' ) { 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.

@param input    InputStream from the "package-list" file.
@param path     URL or the directory path to the packages.
@param relative Is path relative?
@throws IOException if there is a problem reading or closing the stream