GNU Classpath merge.
2002-10-31 Stephen Crawley <crawley@dstc.edu.au> * java/lang/Double.java (valueOf): Return new Double(parseDouble(s)). 2002-10-31 Wu Gansha <gansha.wu@intel.com>: * java/util/ArrayList.java (readObject, writeObject): Only read/write size items. 2002-10-31 Wu Gansha <gansha.wu@intel.com>: * java/io/DataInputStream.java (convertFromUTF): Give StringBuffer an initial estimated size to avoid enlarge buffer frequently. 2002-10-31 Wu Gansha <gansha.wu@intel.com>: * java/lang/reflect/Proxy.java (ProxyType): Set loader to System ClassLoader when null. (ProxyType.hashCode): Loader null check no longer needed. (ProxyType.sameTypes): New method. (ProxyType.equals): Use new method. 2002-10-31 Mark Wielaard <mark@klomp.org> * java/net/URLDecoder.java (decode): Initialize Stringbuffer size to length of String. * java/net/URLEncoder.java (encode): Likewise. 2002-10-31 Mark Wielaard <mark@klomp.org> * java/util/zip/ZipInputStream.java (getNextEntry): Throw IOException when stream is closed. (closeEntry): Likewise. (read): Likewise. * java/util/zip/ZipOutputStream.java (putNextEntry): Throw ZipException when no entry active. (closeEntry): Likewise. (write): Likewise. From-SVN: r58772
This commit is contained in:
parent
c33c471beb
commit
de36f65dd1
9 changed files with 109 additions and 32 deletions
|
@ -1,5 +1,5 @@
|
|||
/* URLEncoder.java -- Class to convert strings to a properly encoded URL
|
||||
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -39,7 +39,7 @@ package java.net;
|
|||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Written using on-line Java Platform 1.2/1.4 API Specification, as well
|
||||
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
|
||||
* Status: Believed complete and correct.
|
||||
|
@ -102,11 +102,11 @@ public class URLEncoder
|
|||
public static String encode(String s, String encoding)
|
||||
throws UnsupportedEncodingException
|
||||
{
|
||||
StringBuffer result = new StringBuffer();
|
||||
int length = s.length();
|
||||
int start = 0;
|
||||
int i = 0;
|
||||
|
||||
StringBuffer result = new StringBuffer(length);
|
||||
while (true)
|
||||
{
|
||||
while ( i < length && isSafe(s.charAt(i)) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue