diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-10 05:19:22 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-10 05:19:22 +0000 |
commit | 15abeadf97a369a32aba39cd94184c23bc3216d6 (patch) | |
tree | f965712000cf470fbf9fff4d979f57fb6d1f2b12 /libjava/java/net/HttpURLConnection.java | |
parent | 56a29009c5924087752fa862c9eea37cdb5d7ab9 (diff) | |
download | gcc-15abeadf97a369a32aba39cd94184c23bc3216d6.tar.gz |
2002-10-08 Michael Koch <konqueror@gmx.de>
* java/net/HttpURLConnection.java
(getPermission): New method.
(getErrorStream): New stub method.
(getHeaderFieldDate): New stub method.
* java/net/Inet4Address.java:
(isLinkLocalAddress): Typo fixed.
* java/net/InetAddress.java:
(readResolve): New stubbed method (for serialization).
(isAnyLocalAddress): New stubbed method.
(isLoopbackAddress): New stubbed method.
(isLinkLocalAddress): New stubbed method.
(isSiteLocalAddress): New stubbed method.
(isMCGlobal): New stubbed method.
(isMCNodeGlobal): New stubbed method.
(isMCLinkLocal): New stubbed method.
(isMCSiteLocal): New stubbed method.
(isMCOrgLocal): New stubbed method.
(getCanonicalHostName): New stubbed method.
(getByAddress): Create instances of Inet4Address/Inet6Address,
instead of InetAddress, documentation added.
* java/net/MulticastSocket.java
(getInterface): Removed FIXME.
(getNetworkInterface): New method.
(setNetworkInterface): New method.
* java/net/NetworkInterface.java:
(toString): Use property "line.separator" instead of "\n".
* java/net/URLConnection.java
(getContent): New stubbed method.
* java/net/URLStreamHandler.java:
(equals): New stubbed method.
(hostsEqual): New stubbed method.
(hashCode): New stubbed method.
* java/net/natNetworkInterface.cc:
(getRealNetworkInterfaces): Create Inet4Address object
instead of InetAddress.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/net/HttpURLConnection.java')
-rw-r--r-- | libjava/java/net/HttpURLConnection.java | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/libjava/java/net/HttpURLConnection.java b/libjava/java/net/HttpURLConnection.java index 5072b60829c..ac48246bb1c 100644 --- a/libjava/java/net/HttpURLConnection.java +++ b/libjava/java/net/HttpURLConnection.java @@ -217,11 +217,35 @@ public abstract class HttpURLConnection extends URLConnection } } - // TODO12: public Permission getPermission() throws IOException - // { - // } + /** + * Returns a permission object representing the permission necessary to make + * the connection represented by this object + * + * @exception IOException If an error occurs + */ + public Permission getPermission() throws IOException + { + return new SocketPermission (url.getHost (), "connect"); + } + + /** + * Returns the error stream if the connection failed but the server sent + * useful data nonetheless + */ + public InputStream getErrorStream () + { + // FIXME: implement this + return null; + } - // TODO12: public InputStream getErrorStream() - // { - // } + /** + * Returns the value of the named field parsed as date + */ + public long getHeaderFieldDate (String key, long value) + { + // FIXME: implement this correctly + // http://www.w3.org/Protocols/HTTP-NG/ng-notes.txt + + return super.getHeaderFieldDate (key, value); + } } |