de.phleisch.app.itsucks.io.impl
Class SequenceRetriever

java.lang.Object
  extended by de.phleisch.app.itsucks.io.impl.FilterDataRetriever
      extended by de.phleisch.app.itsucks.io.impl.SequenceRetriever
All Implemented Interfaces:
DataRetriever

public class SequenceRetriever
extends FilterDataRetriever


Field Summary
protected  long mBytesToSkip
           
protected  DataRetriever mFirst
           
protected  DataRetriever mSecond
           
 
Fields inherited from class de.phleisch.app.itsucks.io.impl.FilterDataRetriever
mDataRetriever
 
Fields inherited from interface de.phleisch.app.itsucks.io.DataRetriever
NOTIFICATION_PROGRESS
 
Constructor Summary
SequenceRetriever(DataRetriever pPrimaryRetriever, DataRetriever pFirst, DataRetriever pSecond)
           
 
Method Summary
 void connect()
          Advise the Retriever to connect to the data source.
 void disconnect()
          Disconnect from the data source.
 long getBytesSkipped()
          Returns the skipped bytes.
 long getContentLenght()
          Returns the content length in bytes.
 java.io.InputStream getDataAsInputStream()
          Returns an input stream for the retrieved data.
 boolean isConnected()
          Returns true if the retriever is connected.
 boolean isDataAvailable()
          Returns true if the data source contains any data to be read.
 void setBytesToSkip(long pBytesToSkip)
          Skip the given bytes (seek) when reading the data source.
 
Methods inherited from class de.phleisch.app.itsucks.io.impl.FilterDataRetriever
abort, getMetadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mFirst

protected DataRetriever mFirst

mSecond

protected DataRetriever mSecond

mBytesToSkip

protected long mBytesToSkip
Constructor Detail

SequenceRetriever

public SequenceRetriever(DataRetriever pPrimaryRetriever,
                         DataRetriever pFirst,
                         DataRetriever pSecond)
Method Detail

getDataAsInputStream

public java.io.InputStream getDataAsInputStream()
                                         throws java.io.IOException
Description copied from interface: DataRetriever
Returns an input stream for the retrieved data.

Specified by:
getDataAsInputStream in interface DataRetriever
Overrides:
getDataAsInputStream in class FilterDataRetriever
Returns:
Throws:
java.io.IOException

connect

public void connect()
             throws java.io.IOException
Description copied from interface: DataRetriever
Advise the Retriever to connect to the data source.

Specified by:
connect in interface DataRetriever
Overrides:
connect in class FilterDataRetriever
Throws:
java.io.IOException

isConnected

public boolean isConnected()
                    throws java.io.IOException
Description copied from interface: DataRetriever
Returns true if the retriever is connected.

Throws:
java.io.IOException

disconnect

public void disconnect()
                throws java.io.IOException
Description copied from interface: DataRetriever
Disconnect from the data source.

Specified by:
disconnect in interface DataRetriever
Overrides:
disconnect in class FilterDataRetriever
Throws:
java.io.IOException

setBytesToSkip

public void setBytesToSkip(long pBytesToSkip)
Description copied from interface: DataRetriever
Skip the given bytes (seek) when reading the data source.

Specified by:
setBytesToSkip in interface DataRetriever
Overrides:
setBytesToSkip in class FilterDataRetriever

getBytesSkipped

public long getBytesSkipped()
Description copied from interface: DataRetriever
Returns the skipped bytes.

Specified by:
getBytesSkipped in interface DataRetriever
Overrides:
getBytesSkipped in class FilterDataRetriever
Returns:

getContentLenght

public long getContentLenght()
                      throws java.io.IOException
Description copied from interface: DataRetriever
Returns the content length in bytes.

Specified by:
getContentLenght in interface DataRetriever
Overrides:
getContentLenght in class FilterDataRetriever
Returns:
Throws:
java.io.IOException

isDataAvailable

public boolean isDataAvailable()
                        throws java.io.IOException
Description copied from interface: DataRetriever
Returns true if the data source contains any data to be read.

Specified by:
isDataAvailable in interface DataRetriever
Overrides:
isDataAvailable in class FilterDataRetriever
Returns:
Throws:
java.io.IOException


Copyright © 2010. All Rights Reserved.