1 |
/* URLStreamHandler.java -- Abstract superclass for all protocol handlers |
/* URLStreamHandler.java -- Abstract superclass for all protocol handlers |
2 |
Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc. |
Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
204 |
{ |
{ |
205 |
// Context is available, but only override it if there is a new file. |
// Context is available, but only override it if there is a new file. |
206 |
int lastSlash = file.lastIndexOf('/'); |
int lastSlash = file.lastIndexOf('/'); |
207 |
|
if (lastSlash < 0) |
208 |
file = |
file = spec.substring(start, end); |
209 |
file.substring(0, lastSlash) + '/' + spec.substring(start, end); |
else |
210 |
|
file = (file.substring(0, lastSlash) |
211 |
|
+ '/' + spec.substring(start, end)); |
212 |
|
|
213 |
if (url.getProtocol().equals("file")) |
if (url.getProtocol().equals("file")) |
214 |
{ |
{ |