public static void printResult(InputReader in, String outputFile) throws IOException{
        FileWriter f = new FileWriter(outputFile);
        BufferedWriter outFile = new BufferedWriter(f);
        
        outFile.write("Rezultate pentru: (");
        for (int i = 0; i < in.NC; i++) {
            outFile.write(in.keyWords.elementAt(i));
            if(i != in.NC - 1)
                outFile.write(", ");
        }
        outFile.write(")\n\n");
        
        for(int k = 0; k < in.documents.size(); k++)
            for (int i = 0; i < outputDocs.size(); i++) {
               if(!outputDocs.elementAt(i).written && 
                  in.documents.elementAt(k).equals(outputDocs.elementAt(i).docName)){
                   outFile.write(outputDocs.elementAt(i).docName + " ");
                   outFile.write("(");
                   for (int j = 0; j < outputDocs.elementAt(i).wordFreqs.size(); j++) {
                       outFile.write(truncFloat(outputDocs.elementAt(i).wordFreqs.elementAt(j)));
                       if(j != outputDocs.elementAt(i).wordFreqs.size() - 1)
                           outFile.write(", ");
                   }
                   outputDocs.elementAt(i).written = false;
                   outFile.write(")");
                   outFile.write('\n');
               }
            }
        outFile.close();
    }