|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.phleisch.app.itsucks.processing.impl.SeekDataProcessorWrapper
public class SeekDataProcessorWrapper
This is data processor wrapper which encapsulates another data processor and skips a given count of bytes before giving the data to the encapsulates processor. This is useful for resuming a file to skip the bytes which are already on the disk.
| Field Summary | |
|---|---|
protected DataProcessor |
mDataProcessor
|
protected long |
mSeekPosition
|
| Constructor Summary | |
|---|---|
SeekDataProcessorWrapper(DataProcessor pDataProcessor,
long pSeekPosition)
|
|
| Method Summary | |
|---|---|
void |
abort()
Will be called when the chain is aborted. |
boolean |
canResume()
Supports this data processor resuming? |
void |
finish()
Shutdown the data processor. |
void |
init()
Initializes the data processor. |
boolean |
isConsumer()
'Consumes' (saves, parses etc.) this processor to the data or is it only an filter? |
boolean |
needsDataAsWholeChunk()
Asks the processor if it needs the data from the data retriever in one chunk and not in multiple pieces. |
DataChunk |
process(DataChunk pDataChunk)
Processes the given data chunk. |
void |
resumeAt(long pByteOffset)
Resumes the processing at the given position. |
void |
rollback()
Will be called when the chain is unexpectly aborted. |
void |
setProcessorChain(DataProcessorChain pChain)
Sets the processor chain the processor is a part of. |
boolean |
supports(Job pJob)
Returns true if this processor supports the given type of job. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DataProcessor mDataProcessor
protected long mSeekPosition
| Constructor Detail |
|---|
public SeekDataProcessorWrapper(DataProcessor pDataProcessor,
long pSeekPosition)
| Method Detail |
|---|
public boolean canResume()
DataProcessor
canResume in interface DataProcessorpublic void finish()
DataProcessor
finish in interface DataProcessor
public void init()
throws ProcessingException
DataProcessor
init in interface DataProcessorProcessingExceptionpublic void abort()
DataProcessorfinish is also called.
abort in interface DataProcessorpublic void rollback()
DataProcessorfinish is also called.
rollback in interface DataProcessorpublic boolean needsDataAsWholeChunk()
DataProcessor
needsDataAsWholeChunk in interface DataProcessor
public DataChunk process(DataChunk pDataChunk)
throws ProcessingException
DataProcessor
process in interface DataProcessorProcessingExceptionpublic void resumeAt(long pByteOffset)
DataProcessor
resumeAt in interface DataProcessorpByteOffset - The offset position in bytes.public void setProcessorChain(DataProcessorChain pChain)
DataProcessor
setProcessorChain in interface DataProcessorpublic boolean supports(Job pJob)
DataProcessor
supports in interface DataProcessorpublic boolean isConsumer()
DataProcessor
isConsumer in interface DataProcessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||