Methods Summary |
---|
private void | assertAttribute(java.io.File file, java.lang.String attributeName)
if (file == null) {
throw new BuildException("Required attribute " + attributeName
+ " not set");
}
|
protected abstract void | doit(java.io.InputStream is, java.io.OutputStream os)
|
public void | execute()
assertAttribute(inFile, "inFile");
assertAttribute(outFile, "outFile");
InputStream inputStream = null;
OutputStream outputStream = null;
try {
inputStream = new BufferedInputStream(
new FileInputStream(getInFile()));
outputStream = new FileOutputStream(getOutFile());
doit(inputStream, outputStream);
} catch (Exception ex) {
throw new BuildException(ex);
} finally {
FILE_UTILS.close(inputStream);
FILE_UTILS.close(outputStream);
}
|
protected java.io.File | getInFile()
return inFile;
|
protected java.io.File | getOutFile()
return outFile;
|
public void | setInFile(java.io.File inFile)
this.inFile = inFile;
|
public void | setOutFile(java.io.File outFile)
this.outFile = outFile;
|