utils.OutputTextFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cf4j-recsys Show documentation
Show all versions of cf4j-recsys Show documentation
A Java's Collaborative Filtering library to carry out experiments in research of Collaborative Filtering based Recommender Systems. The library has been designed from researchers to researchers.
The newest version!
package cf4j.utils;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Util class to write text files line by line (or char by char)
* given the file name.
*
* @author Fernando Ortega
*/
public class OutputTextFile
{
private PrintWriter f;
public OutputTextFile (String filename) throws IOException
{
this.f = new PrintWriter (new FileWriter(filename));
}
public void print (String s)
{
this.f.print(s);
}
public void println (String l)
{
this.f.println(l);
}
public void flush ()
{
this.f.flush();
}
public void close ()
{
this.f.close();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy