Back to project page TrackEveryPenny.
The source code is released under:
Apache License
If you think the Android project TrackEveryPenny listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ca.jbrains.upfp.view; /*w ww .j a v a 2 s .co m*/ import ca.jbrains.upfp.presenter.WriteTextAction; import java.io.*; public class WriteTextToFileAction implements WriteTextAction { private final File destinationFile; public WriteTextToFileAction(File destinationFile) { this.destinationFile = destinationFile; } protected FileWriter fileWriterOnDestinationFile() throws IOException { return new FileWriter(destinationFile); } @Override public void writeText(String text) throws IOException { final FileWriter fileWriter = fileWriterOnDestinationFile(); fileWriter.write(text); fileWriter.flush(); fileWriter.close(); } }