private void doIndex() throws IOException {
        for (int i = 0; i < files.size(); i++) {
            InputStream is = files.get(i);
            String s = new BufferedReader(new InputStreamReader(is)).readLine();
            tokenize(s, i);
        }
    }