com.monkeycoder.monkeynetwork
Class BlindContentDownloader

java.lang.Object
  extended by com.monkeycoder.monkeynetwork.ContentDownloader
      extended by com.monkeycoder.monkeynetwork.BlindContentDownloader

public class BlindContentDownloader
extends ContentDownloader

This ContentDownloader blindly accepts incoming data until the server ends the connection.

This class uses monkeynetwork.ini and requires the following parameters:

Author:
David Stephens

Field Summary
 
Fields inherited from class com.monkeycoder.monkeynetwork.ContentDownloader
hhd
 
Constructor Summary
BlindContentDownloader(HttpHeaderData inHhd)
          Creates a new BlindContentDownloader.
 
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
 

Constructor Detail

BlindContentDownloader

public BlindContentDownloader(HttpHeaderData inHhd)
Creates a new BlindContentDownloader.

Parameters:
inHhd - The header data from this request.
Method Detail

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 blindly assuming that the server will eventually terminate the connection.

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.