[kaffe] CVS kaffe (robilad): Made file protocol connections a little faster
Kaffe CVS
cvs-commits at kaffe.org
Sun Feb 12 11:56:54 PST 2006
PatchSet 7129
Date: 2006/02/12 19:38:30
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Made file protocol connections a little faster
2006-02-12 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java
(unquote) Use System.arraycopy rather than copying UTF-8 bytes one by one.
Fixed comment.
Members:
ChangeLog:1.4647->1.4648
libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java:1.3->1.4
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4647 kaffe/ChangeLog:1.4648
--- kaffe/ChangeLog:1.4647 Sun Feb 12 19:15:17 2006
+++ kaffe/ChangeLog Sun Feb 12 19:38:30 2006
@@ -1,3 +1,9 @@
+2006-02-12 Dalibor Topic <robilad at kaffe.org>
+
+ * libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java
+ (unquote) Use System.arraycopy rather than copying UTF-8 bytes one by one.
+ Fixed comment.
+
2006-02-12 Guilhem Lavaux <guilhem at kaffe.org>
Fix for #19
Index: kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java
diff -u kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java:1.3 kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java:1.4
--- kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java:1.3 Sun Feb 12 01:10:43 2006
+++ kaffe/libraries/javalib/external/classpath/gnu/java/net/protocol/file/Connection.java Sun Feb 12 19:38:36 2006
@@ -135,9 +135,6 @@
* @exception MalformedURLException If the given string contains invalid
* escape sequences.
*
- * Sadly the same as URI.unquote, but there's nothing we can do to
- * make it accessible.
- *
*/
public static String unquote(String str) throws MalformedURLException
{
@@ -163,9 +160,10 @@
else if (c > 127) {
try {
byte [] c_as_bytes = Character.toString(c).getBytes("utf-8");
- for (int j = 0; j < c_as_bytes.length ; j++) {
- buf[pos++] = c_as_bytes[j];
- }
+ System.arraycopy(c_as_bytes, 0, buf, pos, c_as_bytes.length);
+// for (int j = 0; j < c_as_bytes.length ; j++) {
+// buf[pos++] = c_as_bytes[j];
+// }
}
catch (java.io.UnsupportedEncodingException x2) {
throw (Error) new InternalError().initCause(x2);
More information about the kaffe
mailing list