IOutputSaver

public interface IOutputSaver

Represents an output saving service.

Methods

MethodDescription
save(String path, IOutputFile outputFile)Saves the output file to the given path.

save(String path, IOutputFile outputFile)

public abstract void save(String path, IOutputFile outputFile)

Saves the output file to the given path.


Saving into the FileStream implementation example:
 
 public void save(String path, IOutputFile outputFile)
 {
     FileOutputStream stream = new FileOutputStream(path);
     try {
         outputFile.write(stream);
     } catch (IOException e) {
     } finally {
         if (stream != null) stream.close();
     }
 }

Parameters:

ParameterTypeDescription
pathjava.lang.StringPath to save the file to.
outputFileIOutputFileOutput file.