Factor shared constants back out.

This commit is contained in:
Michael Bayne
2010-09-20 18:44:29 +00:00
parent 89229b16cd
commit 487c594e06
2 changed files with 3 additions and 19 deletions
@@ -49,12 +49,8 @@ import java.util.zip.*;
* *
* @version 1.13, 06/26/03 * @version 1.13, 06/26/03
*/ */
public class JarDiff { public class JarDiff implements JarDiffCodes
public static final String VERSION_HEADER = "version 1.0"; {
public static final String INDEX_NAME = "META-INF/INDEX.JD";
public static final String REMOVE_COMMAND = "remove";
public static final String MOVE_COMMAND = "move";
private static final int DEFAULT_READ_SIZE = 2048; private static final int DEFAULT_READ_SIZE = 2048;
private static byte[] newBytes = new byte[DEFAULT_READ_SIZE]; private static byte[] newBytes = new byte[DEFAULT_READ_SIZE];
private static byte[] oldBytes = new byte[DEFAULT_READ_SIZE]; private static byte[] oldBytes = new byte[DEFAULT_READ_SIZE];
@@ -49,20 +49,8 @@ import com.threerings.getdown.util.ProgressObserver;
/** /**
* Applies a jardiff patch to a jar file. * Applies a jardiff patch to a jar file.
*/ */
public class JarDiffPatcher public class JarDiffPatcher implements JarDiffCodes
{ {
/** The name of the jardiff control file. */
public static final String INDEX_NAME = "META-INF/INDEX.JD";
/** The version header used in the control file. */
public static final String VERSION_HEADER = "version 1.0";
/** A jardiff command to remove an entry. */
public static final String REMOVE_COMMAND = "remove";
/** A jardiff command to move an entry. */
public static final String MOVE_COMMAND = "move";
/** /**
* Patches the specified jar file using the supplied patch file and writing * Patches the specified jar file using the supplied patch file and writing
* the new jar file to the supplied target. * the new jar file to the supplied target.