From: incastrix Date: Mon, 12 Oct 2009 18:23:32 +0000 (+0000) Subject: Refactory: remove unused classes, imports, fields and methods. X-Git-Url: http://git.phpeclipse.com Refactory: remove unused classes, imports, fields and methods. --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/util/SimpleNameVector.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/util/SimpleNameVector.java index 5766543..94703a8 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/util/SimpleNameVector.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/util/SimpleNameVector.java @@ -52,10 +52,10 @@ public final class SimpleNameVector { this.size += newElements.length; } - public void copyInto(Object[] targetArray) { - - System.arraycopy(this.elements, 0, targetArray, 0, this.size); - } +// public void copyInto(Object[] targetArray) { +// +// System.arraycopy(this.elements, 0, targetArray, 0, this.size); +// } public boolean contains(char[] element) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/util/Util.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/util/Util.java index 81f89d7..24d6315 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/util/Util.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/util/Util.java @@ -11,7 +11,7 @@ package net.sourceforge.phpdt.internal.compiler.util; import java.io.BufferedInputStream; -import java.io.ByteArrayInputStream; +//import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; @@ -20,8 +20,8 @@ import java.io.InputStreamReader; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; +//import java.util.zip.ZipEntry; +//import java.util.zip.ZipFile; import net.sourceforge.phpdt.core.compiler.CharOperation; import net.sourceforge.phpdt.internal.core.util.PHPFileUtil; @@ -159,13 +159,13 @@ public class Util { * Returns the given bytes as a char array using a given encoding (null * means platform default). */ - public static char[] bytesToChar(byte[] bytes, String encoding) - throws IOException { - - return getInputStreamAsCharArray(new ByteArrayInputStream(bytes), - bytes.length, encoding); - - } +// public static char[] bytesToChar(byte[] bytes, String encoding) +// throws IOException { +// +// return getInputStreamAsCharArray(new ByteArrayInputStream(bytes), +// bytes.length, encoding); +// +// } /** * Returns the contents of the given file as a byte array. @@ -173,20 +173,20 @@ public class Util { * @throws IOException * if a problem occured reading the file. */ - public static byte[] getFileByteContent(File file) throws IOException { - InputStream stream = null; - try { - stream = new BufferedInputStream(new FileInputStream(file)); - return getInputStreamAsByteArray(stream, (int) file.length()); - } finally { - if (stream != null) { - try { - stream.close(); - } catch (IOException e) { - } - } - } - } +// public static byte[] getFileByteContent(File file) throws IOException { +// InputStream stream = null; +// try { +// stream = new BufferedInputStream(new FileInputStream(file)); +// return getInputStreamAsByteArray(stream, (int) file.length()); +// } finally { +// if (stream != null) { +// try { +// stream.close(); +// } catch (IOException e) { +// } +// } +// } +// } /** * Returns the contents of the given file as a char array. When encoding is @@ -344,22 +344,22 @@ public class Util { * @throws IOException * if a problem occured reading the zip entry. */ - public static byte[] getZipEntryByteContent(ZipEntry ze, ZipFile zip) - throws IOException { - - InputStream stream = null; - try { - stream = new BufferedInputStream(zip.getInputStream(ze)); - return getInputStreamAsByteArray(stream, (int) ze.getSize()); - } finally { - if (stream != null) { - try { - stream.close(); - } catch (IOException e) { - } - } - } - } +// public static byte[] getZipEntryByteContent(ZipEntry ze, ZipFile zip) +// throws IOException { +// +// InputStream stream = null; +// try { +// stream = new BufferedInputStream(zip.getInputStream(ze)); +// return getInputStreamAsByteArray(stream, (int) ze.getSize()); +// } finally { +// if (stream != null) { +// try { +// stream.close(); +// } catch (IOException e) { +// } +// } +// } +// } /** * Returns true iff str.toLowerCase().endsWith(".jar") ||