|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.filePiper.processors.ChunkProcessor
public class ChunkProcessor
Processor chunking an input file in a set of output files of fixed size (calculated in lines or bytes).
| Field Summary |
|---|
| Fields inherited from interface net.sf.filePiper.model.FileProcessor |
|---|
MANY, NONE, ONE |
| Fields inherited from interface net.sf.filePiper.processors.SizeAndUnit |
|---|
UNIT_BYTE, UNIT_LINE |
| Constructor Summary | |
|---|---|
ChunkProcessor()
|
|
| Method Summary | |
|---|---|
void |
chunkInBytes(InputStream is,
InputFileInfo info,
FileProcessorEnvironment env)
|
void |
chunkInLines(InputStream is,
InputFileInfo info,
FileProcessorEnvironment env)
|
void |
endBatch(FileProcessorEnvironment env)
Notification that the current batch is finished. |
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 |
getProcessorName()
|
int |
getSize()
|
String |
getStatusMessage()
Get the status of this processor to display in the status bar of the GUI during file processing. |
int |
getUnits()
|
void |
init(net.sf.sfac.setting.Settings settngs)
Initialize this file processor just after instantiation (called only once). |
void |
process(InputStream is,
InputFileInfo info,
FileProcessorEnvironment env)
Request to process the given input stream. |
void |
setSize(int newSize)
|
void |
setUnits(int newUnits)
|
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 ChunkProcessor()
| Method Detail |
|---|
public String getProcessorName()
getProcessorName in interface FileProcessorpublic int getSize()
getSize in interface SizeAndUnitpublic void setSize(int newSize)
setSize in interface SizeAndUnitpublic int getUnits()
getUnits in interface SizeAndUnitpublic void setUnits(int newUnits)
setUnits in interface SizeAndUnitpublic net.sf.sfac.gui.editor.ObjectEditor getEditor()
FileProcessor
getEditor in interface FileProcessorpublic int getOutputCardinality(int inputCardinality)
FileProcessor
getOutputCardinality in interface FileProcessorinputCardinality - ONE or MANY.public void init(net.sf.sfac.setting.Settings settngs)
FileProcessor
init in interface FileProcessorsettngs - Settings for this FileProcessor instance.
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.
public void chunkInLines(InputStream is,
InputFileInfo info,
FileProcessorEnvironment env)
throws IOException
IOException
public void chunkInBytes(InputStream is,
InputFileInfo info,
FileProcessorEnvironment env)
throws IOException
IOExceptionpublic void startBatch(FileProcessorEnvironment env)
FileProcessor
startBatch in interface FileProcessorpublic void endBatch(FileProcessorEnvironment env)
FileProcessor
endBatch in interface FileProcessorpublic 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 FileProcessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||