/[classpath]/classpath/java/net/URLDecoder.java
ViewVC logotype

Diff of /classpath/java/net/URLDecoder.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by mark, Tue Jan 22 22:27:00 2002 UTC revision 1.8 by mark, Fri Oct 25 23:16:16 2002 UTC
# Line 106  public class URLDecoder Line 106  public class URLDecoder
106    public static String decode(String s, String encoding)    public static String decode(String s, String encoding)
107      throws UnsupportedEncodingException      throws UnsupportedEncodingException
108    {    {
     StringBuffer result = new StringBuffer();  
   
109      // First convert all '+' characters to spaces.      // First convert all '+' characters to spaces.
110      String str = s.replace('+', ' ');      String str = s.replace('+', ' ');
111            
# Line 116  public class URLDecoder Line 114  public class URLDecoder
114      int start = 0;      int start = 0;
115      byte[] bytes = null;      byte[] bytes = null;
116      int length = str.length();      int length = str.length();
117        StringBuffer result = new StringBuffer(length);
118      while ((i = str.indexOf('%', start)) >= 0)      while ((i = str.indexOf('%', start)) >= 0)
119        {        {
120          // Add all non-encoded characters to the result buffer          // Add all non-encoded characters to the result buffer

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26