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;
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;
* 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.
* @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
* @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") ||