com.monkeycoder.monkeynetwork
Class ChunkedContentDownloader
java.lang.Object
com.monkeycoder.monkeynetwork.ContentDownloader
com.monkeycoder.monkeynetwork.ChunkedContentDownloader
public class ChunkedContentDownloader
- extends ContentDownloader
This ContentDownloader handles incoming data that is chunked.
This class uses monkeynetwork.ini and requires the following
parameters:
network_buffer_size - Size in bytes of the network stream buffer.
- Author:
- David Stephens
|
Method Summary |
protected boolean |
download(TurboBuffer inBuffer,
java.io.InputStream inStream)
Does the actual downloading of the requested content. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChunkedContentDownloader
public ChunkedContentDownloader(HttpHeaderData inHhd)
- Creates a new ChunkedContentDownloader.
- Parameters:
inHhd - The header data from this request.
download
protected boolean download(TurboBuffer inBuffer,
java.io.InputStream inStream)
throws java.io.IOException,
MonkeyException
- Does the actual downloading of the requested content. This version
reads data from the network in a chunked data stream until the next
chunk is zero bytes in length.
- Specified by:
download in class ContentDownloader
- Parameters:
inBuffer - The TurboBuffer into which the data will be placed.inStream - The InputStream from which the data will be read.
- Returns:
- Whether or not the content has been downloaded successfully.
- Throws:
java.io.IOException - If thrown by underlying code.
MonkeyException - If thrown by underlying code.