|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
de.phleisch.app.itsucks.io.impl.AbstractDataRetriever
de.phleisch.app.itsucks.io.impl.FileRetriever
public class FileRetriever
Implementation of an data retriever which can read files from the filesystem.
| Field Summary |
|---|
| Fields inherited from class de.phleisch.app.itsucks.io.impl.AbstractDataRetriever |
|---|
mContext, mDataConsumer, mUrl |
| Fields inherited from interface de.phleisch.app.itsucks.io.DataRetriever |
|---|
NOTIFICATION_PROGRESS, RESULT_RETRIEVAL_ABORTED, RESULT_RETRIEVAL_FAILED, RESULT_RETRIEVAL_FAILED_BUT_RETRYABLE, RESULT_RETRIEVAL_NOT_STARTED_YET, RESULT_RETRIEVAL_OK |
| Constructor Summary | |
|---|---|
FileRetriever(java.io.File pFile)
|
|
| Method Summary | |
|---|---|
void |
abort()
Aborts the current retrieving. |
void |
connect()
Advise the Retriever to connect to the data source. |
void |
disconnect()
Disconnect from the data source. |
long |
getBytesRetrieved()
Returns the count of bytes read from the data source. |
long |
getBytesSkipped()
Returns the skipped bytes. |
Metadata |
getMetadata()
Returns the metadata of the data source connection. |
float |
getProgress()
Returns the progress in processing the data in percent. |
int |
getResultCode()
Returns the internal state and result code. |
boolean |
isDataAvailable()
Returns true if the data source contains any data to be read. |
void |
retrieve()
Retrieves all available data and send it through the processor chain. |
void |
setBytesToSkip(long pBytesToSkip)
Skip the given bytes (seek) when reading the data source. |
| Methods inherited from class de.phleisch.app.itsucks.io.impl.AbstractDataRetriever |
|---|
getContext, getDataConsumer, getUrl, setContext, setDataConsumer, setUrl |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.phleisch.app.itsucks.io.DataRetriever |
|---|
addObserver, deleteObserver |
| Constructor Detail |
|---|
public FileRetriever(java.io.File pFile)
| Method Detail |
|---|
public void abort()
DataRetriever
public void connect()
throws java.io.IOException
DataRetriever
java.io.IOException
public void disconnect()
throws java.io.IOException
DataRetriever
java.io.IOExceptionpublic long getBytesRetrieved()
DataRetriever
public Metadata getMetadata()
DataRetriever
public float getProgress()
DataRetriever
public boolean isDataAvailable()
throws java.io.IOException
DataRetriever
java.io.IOException
public void retrieve()
throws java.io.IOException
DataRetriever
java.io.IOExceptionpublic void setBytesToSkip(long pBytesToSkip)
DataRetriever
public long getBytesSkipped()
DataRetriever
public int getResultCode()
DataRetriever
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||