|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.flow.core.AbstractActor
adams.flow.transformer.AbstractTransformer
adams.flow.transformer.AbstractSingleCompress
public abstract class AbstractSingleCompress
Ancestor for compression algorithms that only take a single file, like gzip.
| Field Summary | |
|---|---|
protected int |
m_BufferSize
the buffer size to use. |
protected PlaceholderFile |
m_Output
the filename of the GZIP output. |
protected boolean |
m_RemoveInputFile
whether to remove the original input file. |
| Fields inherited from class adams.flow.transformer.AbstractTransformer |
|---|
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
AbstractSingleCompress()
|
|
| Method Summary | |
|---|---|
Class[] |
accepts()
Returns the class that the consumer accepts. |
String |
bufferSizeTipText()
Returns the tip text for this property. |
protected abstract String |
compress(File inFile,
File outFile)
Compresses the file. |
void |
defineOptions()
Adds options to the internal list of options. |
protected String |
doExecute()
Performs the actual transformation. |
Class[] |
generates()
Returns the class of objects that it generates. |
int |
getBufferSize()
Returns the buffer size for the stream. |
protected abstract String |
getDefaultExtension()
Returns the default extension that the compressed archive has, e.g., ".gz" for gzipped files. |
PlaceholderFile |
getOutput()
Returns the GZIP output filename. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
boolean |
getRemoveInputFile()
Returns whether to remove the original input after the file has been compressed. |
abstract String |
outputTipText()
Returns the tip text for this property. |
String |
removeInputFileTipText()
Returns the tip text for this property. |
void |
setBufferSize(int value)
Sets the buffer size for the stream. |
void |
setOutput(PlaceholderFile value)
Sets the GZIP output filename. |
void |
setRemoveInputFile(boolean value)
Sets whether to remove the original input after the file has been compressed. |
| Methods inherited from class adams.flow.transformer.AbstractTransformer |
|---|
backupState, execute, hasPendingOutput, input, output, postExecute, reset, restoreState, wrapUp |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, globalInfo, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean m_RemoveInputFile
protected PlaceholderFile m_Output
protected int m_BufferSize
| Constructor Detail |
|---|
public AbstractSingleCompress()
| Method Detail |
|---|
public void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractActorprotected abstract String getDefaultExtension()
public void setRemoveInputFile(boolean value)
value - true if the input file should be removedpublic boolean getRemoveInputFile()
public String removeInputFileTipText()
public void setOutput(PlaceholderFile value)
value - the filenamepublic PlaceholderFile getOutput()
public abstract String outputTipText()
public void setBufferSize(int value)
value - the size in bytespublic int getBufferSize()
public String bufferSizeTipText()
public String getQuickInfo()
getQuickInfo in interface QuickInfoSupportergetQuickInfo in class AbstractActorpublic Class[] accepts()
public Class[] generates()
protected abstract String compress(File inFile,
File outFile)
inFile - the uncompressed input fileoutFile - the compressed output file
protected String doExecute()
doExecute in class AbstractActor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||