Project Wonder 5.0

er.woinstaller.io
Class FileUtilities

java.lang.Object
  extended by er.woinstaller.io.FileUtilities

public class FileUtilities
extends java.lang.Object


Constructor Summary
FileUtilities()
           
 
Method Summary
static void writeInputStreamToFile(java.io.InputStream stream, java.io.File file, int totalSize, IProgressMonitor progressMonitor)
          Writes the contents of an InputStream to a specified file.
static void writeInputStreamToOutputStream(java.io.InputStream in, java.io.OutputStream out, int totalSize, IProgressMonitor progressMonitor)
          Copies the contents of the input stream to the given output stream.
static void writeUrlToFile(java.net.URL url, java.io.File file, IProgressMonitor progressMonitor)
          Copies the contents of the given URL to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtilities

public FileUtilities()
Method Detail

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 from
file - 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 to
stream - 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 from
out - the output stream to copy to
Throws:
java.io.IOException - if there is any failure

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.