Imported GNU Classpath 0.90

Imported GNU Classpath 0.90
       * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
       * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
       * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
       * java/lang/Math.java: New override file.
       * java/lang/Character.java: Merged from Classpath.
       (start, end): Now 'int's.
       (canonicalName): New field.
       (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
       (UnicodeBlock): Added argument.
       (of): New overload.
       (forName): New method.
       Updated unicode blocks.
       (sets): Updated.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r111942
This commit is contained in:
Mark Wielaard 2006-03-10 21:46:48 +00:00
parent 27079765d0
commit 8aa540d2f7
1367 changed files with 188789 additions and 22762 deletions

View file

@ -1,5 +1,5 @@
/* FTPURLConnection.java --
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,10 +38,9 @@ exception statement from your version. */
package gnu.java.net.protocol.ftp;
import gnu.classpath.SystemProperties;
import gnu.java.net.GetLocalHostAction;
import gnu.java.security.action.GetPropertyAction;
import java.io.FileNotFoundException;
import java.io.FilterInputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
@ -51,7 +50,6 @@ import java.net.InetAddress;
import java.net.URL;
import java.net.URLConnection;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.HashMap;
import java.util.Map;
@ -113,11 +111,9 @@ public class FTPURLConnection
else
{
username = "anonymous";
PrivilegedAction a = new GetPropertyAction("user.name");
String systemUsername =(String) AccessController.doPrivileged(a);
a = new GetLocalHostAction();
GetLocalHostAction a = new GetLocalHostAction();
InetAddress localhost =(InetAddress) AccessController.doPrivileged(a);
password = systemUsername + "@" +
password = SystemProperties.getProperty("user.name") + "@" +
((localhost == null) ? "localhost" : localhost.getHostName());
}
connection = new FTPConnection(host, port);
@ -167,24 +163,13 @@ public class FTPURLConnection
connect();
}
String path = url.getPath();
String filename = null;
int lsi = path.lastIndexOf('/');
if (lsi != -1)
if (connection.changeWorkingDirectory(path))
{
filename = path.substring(lsi + 1);
path = path.substring(0, lsi);
if (!connection.changeWorkingDirectory(path))
{
throw new FileNotFoundException(path);
}
}
if (filename != null && filename.length() > 0)
{
return this.new ClosingInputStream(connection.retrieve(filename));
return this.new ClosingInputStream(connection.list(null));
}
else
{
return this.new ClosingInputStream(connection.list(null));
return this.new ClosingInputStream(connection.retrieve(path));
}
}
@ -198,20 +183,8 @@ public class FTPURLConnection
{
connect();
}
String dir = url.getPath();
String filename = url.getFile();
if (!connection.changeWorkingDirectory(dir))
{
throw new FileNotFoundException(dir);
}
if (filename != null)
{
return this.new ClosingOutputStream(connection.store(filename));
}
else
{
throw new FileNotFoundException(filename);
}
String path = url.getPath();
return this.new ClosingOutputStream(connection.store(path));
}
public String getRequestProperty(String key)