diff options
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 5072b60..ac48246 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); + } } |