org.eclipse.emf.facet.util.core.internal.exported
Class FileUtils

java.lang.Object
  extended by org.eclipse.emf.facet.util.core.internal.exported.FileUtils

public final class FileUtils
extends java.lang.Object

Since:
0.2

Method Summary
static boolean copyFile(java.io.File source, java.io.File destination)
          Copies the source file to the target file.
static IFile copyFileFromBundle(java.lang.String sourcePath, IProject project, java.lang.String destinationPath, Bundle bundleContainingResources)
           
static java.lang.String getFileContents(Bundle bundle, java.lang.String path)
          Get the contents of a file from a Bundle
static java.lang.String readInputStream(java.io.InputStream stream)
           
static java.lang.String readInputStream(java.io.InputStream stream, java.lang.String charset)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFileContents

public static java.lang.String getFileContents(Bundle bundle,
                                               java.lang.String path)
                                        throws java.io.IOException
Get the contents of a file from a Bundle

Throws:
java.io.IOException

readInputStream

public static java.lang.String readInputStream(java.io.InputStream stream)
                                        throws java.io.IOException
Throws:
java.io.IOException

readInputStream

public static java.lang.String readInputStream(java.io.InputStream stream,
                                               java.lang.String charset)
                                        throws java.io.IOException
Throws:
java.io.IOException

copyFileFromBundle

public static IFile copyFileFromBundle(java.lang.String sourcePath,
                                       IProject project,
                                       java.lang.String destinationPath,
                                       Bundle bundleContainingResources)
                                throws java.io.IOException,
                                       CoreException
Throws:
java.io.IOException
CoreException

copyFile

public static final boolean copyFile(java.io.File source,
                                     java.io.File destination)
Copies the source file to the target file.

Returns:
true if successful, false otherwise