info.magnolia.module.files
Class BasicFileExtractorOperation
java.lang.Object
info.magnolia.module.files.BasicFileExtractorOperation
public class BasicFileExtractorOperation
- extends java.lang.Object
A simple FileExtractorOperation which just extracts a resource from the class path
to the filesystem.
- Version:
- $Revision: $ ($Author: $)
- Author:
- gjoseph
Method Summary |
protected java.io.InputStream |
checkInput()
|
protected java.io.File |
checkOutput()
|
protected void |
copyAndClose(java.io.InputStream in,
java.io.OutputStream out)
|
void |
extract()
|
protected java.io.OutputStream |
openOutput(java.io.File targetFile)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resourcePath
protected final java.lang.String resourcePath
absoluteTargetPath
protected final java.lang.String absoluteTargetPath
extract
public void extract()
throws java.io.IOException
- Throws:
java.io.IOException
checkInput
protected java.io.InputStream checkInput()
throws java.io.IOException
- Throws:
java.io.IOException
checkOutput
protected java.io.File checkOutput()
throws java.io.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:
java.io.IOException
openOutput
protected java.io.OutputStream openOutput(java.io.File targetFile)
throws java.io.IOException
- Throws:
java.io.IOException
copyAndClose
protected void copyAndClose(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.