er.woinstaller.io
Class FileUtilities
java.lang.Object
er.woinstaller.io.FileUtilities
public class FileUtilities
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUtilities
public FileUtilities()
writeUrlToFile
public static void writeUrlToFile(java.net.URL url,
java.io.File file,
IProgressMonitor progressMonitor)
throws java.io.IOException
- Copies the contents of the given URL to a file.
- Parameters:
url - the URL to copy fromfile - the File to write to
- Throws:
java.io.IOException - if the copy fails
writeInputStreamToFile
public static void writeInputStreamToFile(java.io.InputStream stream,
java.io.File file,
int totalSize,
IProgressMonitor progressMonitor)
throws java.io.IOException
- Writes the contents of an InputStream to a specified file.
- Parameters:
file - to write tostream - to pull data from
- Throws:
java.io.IOException
writeInputStreamToOutputStream
public static void writeInputStreamToOutputStream(java.io.InputStream in,
java.io.OutputStream out,
int totalSize,
IProgressMonitor progressMonitor)
throws java.io.IOException
- Copies the contents of the input stream to the given output stream. Both streams are
guaranteed to be closed by the end of this method.
- Parameters:
in - the input stream to copy fromout - the output stream to copy to
- Throws:
java.io.IOException - if there is any failure
Copyright © 2002 – 2007 Project Wonder.