
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __java_net_URLConnection__
#define __java_net_URLConnection__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace java
  {
    namespace net
    {
        class ContentHandler;
        class ContentHandlerFactory;
        class FileNameMap;
        class URL;
        class URLConnection;
    }
    namespace security
    {
        class Permission;
    }
    namespace text
    {
        class ParsePosition;
        class SimpleDateFormat;
    }
  }
}

class java::net::URLConnection : public ::java::lang::Object
{

public: // actually protected
  URLConnection(::java::net::URL *);
public:
  virtual void connect() = 0;
  virtual ::java::net::URL * getURL();
  virtual jint getConnectTimeout();
  virtual void setConnectTimeout(jint);
  virtual jint getReadTimeout();
  virtual void setReadTimeout(jint);
  virtual jint getContentLength();
  virtual ::java::lang::String * getContentType();
  virtual ::java::lang::String * getContentEncoding();
  virtual jlong getExpiration();
  virtual jlong getDate();
  virtual jlong getLastModified();
  virtual ::java::lang::String * getHeaderField(jint);
  virtual ::java::lang::String * getHeaderField(::java::lang::String *);
  virtual ::java::util::Map * getHeaderFields();
  virtual jint getHeaderFieldInt(::java::lang::String *, jint);
  virtual jlong getHeaderFieldDate(::java::lang::String *, jlong);
  virtual ::java::lang::String * getHeaderFieldKey(jint);
  virtual ::java::lang::Object * getContent();
  virtual ::java::lang::Object * getContent(JArray< ::java::lang::Class * > *);
  virtual ::java::security::Permission * getPermission();
  virtual ::java::io::InputStream * getInputStream();
  virtual ::java::io::OutputStream * getOutputStream();
  virtual ::java::lang::String * toString();
  virtual void setDoInput(jboolean);
  virtual jboolean getDoInput();
  virtual void setDoOutput(jboolean);
  virtual jboolean getDoOutput();
  virtual void setAllowUserInteraction(jboolean);
  virtual jboolean getAllowUserInteraction();
  static void setDefaultAllowUserInteraction(jboolean);
  static jboolean getDefaultAllowUserInteraction();
  virtual void setUseCaches(jboolean);
  virtual jboolean getUseCaches();
  virtual void setIfModifiedSince(jlong);
  virtual jlong getIfModifiedSince();
  virtual jboolean getDefaultUseCaches();
  virtual void setDefaultUseCaches(jboolean);
  virtual void setRequestProperty(::java::lang::String *, ::java::lang::String *);
  virtual void addRequestProperty(::java::lang::String *, ::java::lang::String *);
  virtual ::java::lang::String * getRequestProperty(::java::lang::String *);
  virtual ::java::util::Map * getRequestProperties();
  static void setDefaultRequestProperty(::java::lang::String *, ::java::lang::String *);
  static ::java::lang::String * getDefaultRequestProperty(::java::lang::String *);
  static void setContentHandlerFactory(::java::net::ContentHandlerFactory *);
  static ::java::lang::String * guessContentTypeFromName(::java::lang::String *);
  static ::java::lang::String * guessContentTypeFromStream(::java::io::InputStream *);
  static ::java::net::FileNameMap * getFileNameMap();
  static void setFileNameMap(::java::net::FileNameMap *);
private:
  ::java::net::ContentHandler * getContentHandler(::java::lang::String *);
  static void initializeDateFormats();
  static ::java::net::FileNameMap * fileNameMap;
  static ::java::net::ContentHandlerFactory * factory;
  static jboolean defaultAllowUserInteraction;
  static jboolean defaultUseCaches;
  static ::java::net::ContentHandlerFactory * defaultFactory;
public: // actually protected
  jboolean __attribute__((aligned(__alignof__( ::java::lang::Object)))) allowUserInteraction;
  jboolean connected;
  jboolean doInput;
  jboolean doOutput;
  jboolean useCaches;
  jlong ifModifiedSince;
  ::java::net::URL * url;
private:
  static JArray< ::java::text::SimpleDateFormat * > * dateFormats;
  static jboolean dateformats_initialized;
  jint connectTimeout;
  jint readTimeout;
  ::java::text::ParsePosition * position;
public:
  static ::java::lang::Class class$;
};

#endif // __java_net_URLConnection__
