org.cyberlab.support.templates
Class CopyFromUrlToFileTemplate

java.lang.Object
  extended by org.cyberlab.support.templates.CopyFromUrlToFileTemplate

public class CopyFromUrlToFileTemplate
extends java.lang.Object

Template class for copying data from an URL to a File using a StreamCopy processor.

Author:
Mats-Gøran Karlsen
See Also:
StreamCopy

Constructor Summary
CopyFromUrlToFileTemplate()
           
 
Method Summary
static void process(java.net.URL fromURL, java.io.File toFile, StreamCopy processor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyFromUrlToFileTemplate

public CopyFromUrlToFileTemplate()
Method Detail

process

public static void process(java.net.URL fromURL,
                           java.io.File toFile,
                           StreamCopy processor)
                    throws java.lang.Exception
Parameters:
fromURL - The URL to copy from.
toFile - The file for which to write the data
processor - a processor implementing the StreamCopy interface.
Throws:
java.lang.Exception