diff options
author | Michael Koch <mkoch@gcc.gnu.org> | 2004-04-22 07:02:26 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2004-04-22 07:02:26 +0000 |
commit | e930d01a4fb071e00edb80bc0c5a878733394bbf (patch) | |
tree | f41e95314a0b8cd69db84e7e7c3823e647e7bd42 /libjava/java/net/URLConnection.java | |
parent | 5d79367d7af65892dff13ab3d0e0747d71ddd6e8 (diff) | |
download | gcc-e930d01a4fb071e00edb80bc0c5a878733394bbf.zip gcc-e930d01a4fb071e00edb80bc0c5a878733394bbf.tar.gz gcc-e930d01a4fb071e00edb80bc0c5a878733394bbf.tar.bz2 |
[multiple changes]
2004-04-22 Jeroen Frijters <jeroen@sumatra.nl>
* java/net/URLStreamHandler.java
(parseURL): Convert the file path to using '/' instead of native
file separator.
2004-04-22 Guilhem Lavaux <guilhem@kaffe.org>
* java/net/URL.java
(userInfo): New field.
(URL): Set authority to the right value.
(setURL): Fixed authority and file initialization.
* java/net/URLStreamHandler.java
(parseURL): Take care of the query tag. Build authority.
(toExternalForm): Fixed URL building using authority.
From-SVN: r81006
Diffstat (limited to 'libjava/java/net/URLConnection.java')
-rw-r--r-- | libjava/java/net/URLConnection.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libjava/java/net/URLConnection.java b/libjava/java/net/URLConnection.java index 6b12568..39fbd32 100644 --- a/libjava/java/net/URLConnection.java +++ b/libjava/java/net/URLConnection.java @@ -108,7 +108,7 @@ public abstract class URLConnection * This is the default value that will be used to determine whether or * not user interaction should be allowed. */ - private static boolean defaultAllowUserInteraction = false; + private static boolean defaultAllowUserInteraction; /** * This is the default flag indicating whether or not to use caches to @@ -126,7 +126,7 @@ public abstract class URLConnection * Indicates whether or not a connection has been established to the * destination specified in the URL */ - protected boolean connected = false; + protected boolean connected; /** * Indicates whether or not input can be read from this URL @@ -136,7 +136,7 @@ public abstract class URLConnection /** * Indicates whether or not output can be sent to this URL */ - protected boolean doOutput = false; + protected boolean doOutput; /** * If this flag is set, the protocol is allowed to cache data whenever @@ -157,7 +157,7 @@ public abstract class URLConnection * modified more recently than the date set in this variable. That date * should be specified as the number of seconds since 1/1/1970 GMT. */ - protected long ifModifiedSince = 0L; + protected long ifModifiedSince; /** * This is the URL associated with this connection @@ -165,8 +165,10 @@ public abstract class URLConnection protected URL url; private static Hashtable handlers = new Hashtable(); - private static SimpleDateFormat dateFormat1, dateFormat2, dateFormat3; - private static boolean dateformats_initialized = false; + private static SimpleDateFormat dateFormat1; + private static SimpleDateFormat dateFormat2; + private static SimpleDateFormat dateFormat3; + private static boolean dateformats_initialized; /** * Creates a URL connection to a given URL. A real connection is not made. @@ -430,10 +432,10 @@ public abstract class URLConnection String type = getContentType(); ContentHandler ch = setContentHandler(type); - if (ch == null) - return getInputStream(); + if (ch != null) + return ch.getContent(this); - return ch.getContent(this); + return getInputStream(); } /** |