| java.lang.Object org.acm.seguin.io.FileCopy
FileCopy | public class FileCopy implements Runnable(Code) | | Responsible for copying a file from one location to another. This object
is implemented as a thread so that if the user of this object does not
care when the copy is complete, they can set the parameters and then
launch the thread.
To perform other operations on the streams while copying the thread,
simply overload the getInputStream or getOutputStream operations.
author: Chris Seguin author: Mike Atkinson |
FileCopy | public FileCopy(File src, File dst)(Code) | | Constructor for the FileCopy object
Parameters: src - the source Parameters: dst - the destination |
FileCopy | public FileCopy(File src, File dst, boolean isNoisy)(Code) | | Create a file copy thread
Parameters: src - the source Parameters: dst - the destination Parameters: isNoisy - is this thread supposed to report on it's progress |
getInputStream | protected synchronized InputStream getInputStream() throws IOException(Code) | | Gets the InputStream attribute of the FileCopy object
The InputStream value exception: FileNotFoundException - Unable to open the file |
getOutputStream | protected synchronized OutputStream getOutputStream() throws IOException(Code) | | Gets the OutputStream attribute of the FileCopy object
The OutputStream value exception: FileNotFoundException - Unable to open the file |
main | public static void main(String[] args)(Code) | | Tester
Parameters: args - The command line arguments |
run | public synchronized void run()(Code) | | Copy the thread
|
|
|