org.netbeans.modules.diff/1 1.33.1 42

org.netbeans.api.diff
Class PatchUtils

java.lang.Object
  extended by org.netbeans.api.diff.PatchUtils

public class PatchUtils
extends Object

Utility class for patch application.

Since:
1.19

Method Summary
static void applyPatch(File patch, File context)
          Applies the patch file on the context file or folder.
static boolean isPatch(File patch)
          Returns true only if the given file is a patch in a format recognizable as a context normal unified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

applyPatch

public static void applyPatch(File patch,
                              File context)
                       throws IOException
Applies the patch file on the context file or folder. The patch file may be in a context, normal or unified format.

Parameters:
patch - the patch file
context - the file or folder to be updated with the patch
Throws:
org.netbeans.modules.diff.builtin.PatchException
IOException - - the patch is invalid or cannot be applied
Since:
1.19

isPatch

public static boolean isPatch(File patch)
                       throws IOException
Returns true only if the given file is a patch in a format recognizable as a

Parameters:
file - patch file
Returns:
true if the given input stream is a patch otherwise false
Throws:
IOException
Since:
1.19

org.netbeans.modules.diff/1 1.33.1 42

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.