From b3dcdeb51d7db780bcc2eb0b8575ee3c22cab386 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 11 Jul 2006 18:49:36 +0000 Subject: [PATCH] Tightened access modifiers in LWJGLInstaller --- .../org/lwjgl/util/applet/LWJGLInstaller.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/java/org/lwjgl/util/applet/LWJGLInstaller.java b/src/java/org/lwjgl/util/applet/LWJGLInstaller.java index 3dd255b7..9f5e4031 100644 --- a/src/java/org/lwjgl/util/applet/LWJGLInstaller.java +++ b/src/java/org/lwjgl/util/applet/LWJGLInstaller.java @@ -63,21 +63,17 @@ import org.lwjgl.LWJGLUtil; * $Id$ */ public class LWJGLInstaller { - - /** Whether the installer has been called */ - public static boolean installed; - /** Whether to hook uninstall rutine. Must be called prior to installation */ public static boolean disableUninstall = false; - - /** Buffer used when copying files */ - private static final byte[] COPY_BUFFER = new byte[4096]; + /** Whether the installer has been called */ + private static boolean installed; + /** Directory all lwjgl installations go into */ - public static final String MASTER_INSTALL_DIR = ".lwjglinstall"; + private static final String MASTER_INSTALL_DIR = ".lwjglinstall"; /** Name of the native jar we're expected to load and install */ - public static final String NATIVES_PLATFORM_JAR = "/" + LWJGLUtil.getPlatformName() + "_natives.jar"; + private static final String NATIVES_PLATFORM_JAR = "/" + LWJGLUtil.getPlatformName() + "_natives.jar"; private LWJGLInstaller() { /* Unused */ @@ -259,9 +255,11 @@ public class LWJGLInstaller { * @throws IOException if the copy process fail in any way */ private static void copyFile(InputStream is, OutputStream os) throws IOException { + byte[] copy_buffer = new byte[4096]; + int len; - while ((len = is.read(COPY_BUFFER)) > 0) { - os.write(COPY_BUFFER, 0, len); + while ((len = is.read(copy_buffer)) > 0) { + os.write(copy_buffer, 0, len); } os.close();