Revision: 10011
Author: gwt.mirror...@gmail.com
Date: Mon Apr 18 08:17:02 2011
Log: Cherry picking r10010 into releases/gwt_2.3
http://code.google.com/p/google-web-toolkit/source/detail?r=10011
Modified:
/releases/2.3/dev/core/src/com/google/gwt/dev/util/Util.java
=======================================
--- /releases/2.3/dev/core/src/com/google/gwt/dev/util/Util.java Sun Feb 6
16:09:46 2011
+++ /releases/2.3/dev/core/src/com/google/gwt/dev/util/Util.java Mon Apr 18
04:51:33 2011
@@ -140,7 +140,7 @@
public static String computeStrongName(byte[] content) {
return computeStrongName(new byte[][] {content});
}
-
+
/**
* Computes the MD5 hash of the specified byte arrays.
*
@@ -174,7 +174,7 @@
}
return Utility.toHexString(md5.digest());
}
-
+
public static void copy(InputStream is, OutputStream os) throws
IOException {
try {
copyNoClose(is, os);
@@ -433,6 +433,16 @@
File file = new File(installPath + '/' + relativePath);
return readFileAsString(file);
}
+
+ /**
+ * A 4-digit hex result.
+ *
+ * @deprecated use {@link Utility#hex4(char, StringBuffer)} instead.
+ */
+ @Deprecated
+ public static void hex4(char c, StringBuffer sb) {
+ Utility.hex4(c, sb);
+ }
/**
* This method invokes an inaccessible method in another class.
@@ -498,22 +508,6 @@
return true;
}
-
- // /**
- // * Reads the file as an array of strings.
- // */
- // public static String[] readURLAsStrings(URL url) {
- // ArrayList lines = new ArrayList();
- // String contents = readURLAsString(url);
- // if (contents != null) {
- // StringReader sr = new StringReader(contents);
- // BufferedReader br = new BufferedReader(sr);
- // String line;
- // while (null != (line = readNextLine(br)))
- // lines.add(line);
- // }
- // return (String[]) lines.toArray(new String[lines.size()]);
- // }
public static void logMissingTypeErrorWithHints(TreeLogger logger,
String missingType) {
@@ -602,6 +596,22 @@
return relativeFile;
}
+
+ // /**
+ // * Reads the file as an array of strings.
+ // */
+ // public static String[] readURLAsStrings(URL url) {
+ // ArrayList lines = new ArrayList();
+ // String contents = readURLAsString(url);
+ // if (contents != null) {
+ // StringReader sr = new StringReader(contents);
+ // BufferedReader br = new BufferedReader(sr);
+ // String line;
+ // while (null != (line = readNextLine(br)))
+ // lines.add(line);
+ // }
+ // return (String[]) lines.toArray(new String[lines.size()]);
+ // }
public static String makeRelativePath(File from, File to) {
File f = makeRelativeFile(from, to);
@@ -1008,6 +1018,20 @@
}
return a;
}
+
+ /**
+ * Returns a string representation of the byte array as a series of
+ * hexadecimal characters.
+ *
+ * @param bytes byte array to convert
+ * @return a string representation of the byte array as a series of
+ * hexadecimal characters
+ * @deprecated use {@link Utility#toHexString(byte[])} instead.
+ */
+ @Deprecated
+ public static String toHexString(byte[] bytes) {
+ return Utility.toHexString(bytes);
+ }
/**
* Returns a String representing the character content of the bytes; the
bytes
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors