Class DownloadFile

  • All Implemented Interfaces:
    AdditionalInformationHandler, BufferSupporter, CleanUpHandler, Destroyable, GlobalInfoSupporter, FileWriter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, InputConsumer, Serializable, Comparable

    public class DownloadFile
    extends AbstractFileWriter
    implements BufferSupporter
    Downloads a file from a URL and saves it locally.
    Also handles basic authentication when using URLs like this:

    - accepts:

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: DownloadFile
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console.
        default: false
    -output <> (property: outputFile)
        The file to save the downloaded content to.
        default: ${CWD}
    -buffer-size <int> (property: bufferSize)
        The size of byte-buffer used for reading/writing the content.
        default: 1024
        minimum: 1
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_BufferSize

        protected int m_BufferSize
        the buffer size to use.
    • Constructor Detail

      • DownloadFile

        public DownloadFile()