|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.filePiper.model.OneToOneByteFileProcessor
public abstract class OneToOneByteFileProcessor
Base implementation for FileProcessor with ONE to ONE cardinality and processing byte streams.
There is only 3 remaining abstract methods very simple to implement.
| Field Summary |
|---|
| Fields inherited from interface net.sf.filePiper.model.FileProcessor |
|---|
MANY, NONE, ONE |
| Constructor Summary | |
|---|---|
OneToOneByteFileProcessor()
|
|
| Method Summary | |
|---|---|
void |
bytesProcessed(int nbrByteProcessed)
|
void |
endBatch(FileProcessorEnvironment env)
Notification that the current batch is finished. |
protected InputFileInfo |
getCurrentInputFileInfo()
|
net.sf.sfac.gui.editor.ObjectEditor |
getEditor()
Get a GUI editor for this object. |
int |
getOutputCardinality(int inputCardinality)
Get the number of output streams generated for the given number of input streams. |
String |
getProcessorDescription()
|
abstract String |
getProcessorName()
|
protected String |
getProposedExtension(InputFileInfo info)
|
abstract String |
getProposedNameSuffix()
|
protected net.sf.sfac.setting.Settings |
getSettings()
|
String |
getStatusMessage()
Get the status of this processor to display in the status bar of the GUI during file processing. |
void |
init(net.sf.sfac.setting.Settings sett)
Initialize this file processor just after instantiation (called only once). |
void |
inputFileStarted()
|
void |
linesProcessed(int nbrLineProcessed)
|
void |
process(InputStream is,
InputFileInfo info,
FileProcessorEnvironment env)
Request to process the given input stream. |
abstract void |
process(InputStream is,
OutputStream os,
FileProcessorEnvironment env)
|
protected void |
setCurrentInputFileInfo(InputFileInfo info)
|
protected void |
setProposedFilePath(InputFileInfo info)
|
void |
startBatch(FileProcessorEnvironment env)
Notification that the processing of a batch of file is starting. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OneToOneByteFileProcessor()
| Method Detail |
|---|
public void init(net.sf.sfac.setting.Settings sett)
FileProcessor
init in interface FileProcessorsett - Settings for this FileProcessor instance.protected net.sf.sfac.setting.Settings getSettings()
protected InputFileInfo getCurrentInputFileInfo()
protected void setCurrentInputFileInfo(InputFileInfo info)
public void startBatch(FileProcessorEnvironment env)
FileProcessor
startBatch in interface FileProcessorpublic void endBatch(FileProcessorEnvironment env)
FileProcessor
endBatch in interface FileProcessorpublic int getOutputCardinality(int inputCardinality)
FileProcessor
getOutputCardinality in interface FileProcessorinputCardinality - ONE or MANY.
public void process(InputStream is,
InputFileInfo info,
FileProcessorEnvironment env)
throws IOException
FileProcessor
process in interface FileProcessoris - the InputStream to processinfo - Information about the input file to processenv - object used by this FileProcessor to interact with its environment.
IOException - if something goes wrong.protected void setProposedFilePath(InputFileInfo info)
protected String getProposedExtension(InputFileInfo info)
public net.sf.sfac.gui.editor.ObjectEditor getEditor()
FileProcessor
getEditor in interface FileProcessorpublic String getProcessorDescription()
public String getStatusMessage()
FileProcessorWarning: this method is called in a different Thread from the processing Thread (the Thread calling the process(..) method). It is usually called from the swing EventDispatchThread. So, be aware of possible threading synchronization problems while accessing the instance variables of your class.
getStatusMessage in interface FileProcessorpublic void inputFileStarted()
public void linesProcessed(int nbrLineProcessed)
public void bytesProcessed(int nbrByteProcessed)
public abstract String getProcessorName()
getProcessorName in interface FileProcessorpublic abstract String getProposedNameSuffix()
public abstract void process(InputStream is,
OutputStream os,
FileProcessorEnvironment env)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||