/* Copyright (c) 2008, Avian Contributors

   Permission to use, copy, modify, and/or distribute this software
   for any purpose with or without fee is hereby granted, provided
   that the above copyright notice and this permission notice appear
   in all copies.

   There is NO WARRANTY for this software.  See license.txt for
   details. */

package java.net;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public abstract class URLConnection {
  protected final URL url;

  protected URLConnection(URL url) {
    this.url = url;
  }

  public Object getContent() throws IOException {
    return getInputStream();
  }

  public int getContentLength() {
    return -1;
  }

  public InputStream getInputStream() throws IOException {
    throw new UnknownServiceException();
  }

  public OutputStream getOutputStream() throws IOException {
    throw new UnknownServiceException();
  }
}

@@ -508,16 +508,128 @@
 URL url;
+%0A  protected boolean doInput = true;%0A  protected boolean doOutput = false;%0A  protected boolean useCaches = true;
 %0A%0A  prot
@@ -818,24 +818,78 @@
 rn -1;%0A  %7D%0A%0A
+  public abstract void connect() throws IOException;%0A%0A
   public Inp
@@ -1034,32 +1034,32 @@
 s IOException %7B%0A
-
     throw new Un
@@ -1086,11 +1086,312 @@
 n();%0A  %7D
+%0A%0A  public boolean getDoInput() %7B%0A    return doInput;%0A  %7D%0A%0A  public boolean getDoOutput() %7B%0A    return doOutput;%0A  %7D%0A%0A  public void setDoInput(boolean v) %7B%0A    doInput = v;%0A  %7D%0A%0A  public void setDoOutput(boolean v) %7B%0A    doInput = v;%0A  %7D%0A%0A  public void setUseCaches(boolean v) %7B%0A    useCaches = v;%0A  %7D
 %0A%7D%0A

add URLConnection methods