info.magnolia.module.files
Class BasicFileExtractorOperation
java.lang.Object
info.magnolia.module.files.BasicFileExtractorOperation
public class BasicFileExtractorOperation
- extends Object
A simple FileExtractorOperation which just extracts a resource from the class path
to the filesystem.
- Version:
- $Revision: $ ($Author: $)
- Author:
- gjoseph
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resourcePath
protected final String resourcePath
absoluteTargetPath
protected final String absoluteTargetPath
extract
public void extract()
throws IOException
- Throws:
IOException
checkInput
protected InputStream checkInput()
throws IOException
- Throws:
IOException
checkOutput
protected File checkOutput()
throws IOException
- Returns:
- a java.io.File corresponding to the absoluteTargetPath if the path is validated,
or null if the file should not be extracted. TODO ugly.
- Throws:
IOException
openOutput
protected OutputStream openOutput(File targetFile)
throws IOException
- Throws:
IOException
copyAndClose
protected void copyAndClose(InputStream in,
OutputStream out)
throws IOException
- Throws:
IOException
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.