JML

java.net
Class URLConnection

java.lang.Object
  extended byjava.net.URLConnection

public abstract class URLConnection
extends Object


Model Field Summary
 
Model fields inherited from class java.lang.Object
_getClass, objectState, theString
 
Ghost Field Summary
 
Ghost fields inherited from class java.lang.Object
objectTimesFinalized, owner
 
Field Summary
protected  boolean allowUserInteraction
           
protected  boolean connected
           
private static String contentClassPrefix
           
private static String contentPathProp
           
private static boolean defaultAllowUserInteraction
           
private static boolean defaultUseCaches
           
protected  boolean doInput
           
protected  boolean doOutput
           
(package private) static ContentHandlerFactory factory
           
private static FileNameMap fileNameMap
           
private static boolean fileNameMapLoaded
           
private static Hashtable handlers
           
protected  long ifModifiedSince
           
private static ContentHandler UnknownContentHandlerP
           
protected  URL url
           
protected  boolean useCaches
           
 
Constructor Summary
protected URLConnection(URL)
           
 
Model Method Summary
 
Model methods inherited from class java.lang.Object
hashValue
 
Method Summary
 void addRequestProperty(String, String)
           
private static boolean checkfpx(InputStream)
           
abstract  void connect()
           
 boolean getAllowUserInteraction()
           
 Object getContent()
           
 Object getContent(Class[])
           
 String getContentEncoding()
           
(package private)  ContentHandler getContentHandler()
           
private  String getContentHandlerPkgPrefixes()
           
 int getContentLength()
           
 String getContentType()
           
 long getDate()
           
static boolean getDefaultAllowUserInteraction()
           
static String getDefaultRequestProperty(String)
           
 boolean getDefaultUseCaches()
           
 boolean getDoInput()
           
 boolean getDoOutput()
           
 long getExpiration()
           
static FileNameMap getFileNameMap()
           
 String getHeaderField(int)
           
 String getHeaderField(String)
           
 long getHeaderFieldDate(String, long)
           
 int getHeaderFieldInt(String, int)
           
 String getHeaderFieldKey(int)
           
 Map getHeaderFields()
           
 long getIfModifiedSince()
           
 InputStream getInputStream()
           
 long getLastModified()
           
 OutputStream getOutputStream()
           
 Permission getPermission()
           
 Map getRequestProperties()
           
 String getRequestProperty(String)
           
 URL getURL()
           
 boolean getUseCaches()
           
static String guessContentTypeFromName(String)
           
static String guessContentTypeFromStream(InputStream)
           
private  ContentHandler lookupContentHandlerClassFor(String)
           
private static int readBytes(int[], int, InputStream)
           
 void setAllowUserInteraction(boolean)
           
static void setContentHandlerFactory(ContentHandlerFactory)
           
static void setDefaultAllowUserInteraction(boolean)
           
static void setDefaultRequestProperty(String, String)
           
 void setDefaultUseCaches(boolean)
           
 void setDoInput(boolean)
           
 void setDoOutput(boolean)
           
static void setFileNameMap(FileNameMap)
           
 void setIfModifiedSince(long)
           
 void setRequestProperty(String, String)
           
 void setUseCaches(boolean)
           
private static long skipForward(InputStream, long)
           
private  String stripOffParameters(String)
           
 String toString()
           
private  String typeToPackageName(String)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

factory

static ContentHandlerFactory factory

doInput

protected boolean doInput

defaultAllowUserInteraction

private static boolean defaultAllowUserInteraction

fileNameMap

private static FileNameMap fileNameMap

doOutput

protected boolean doOutput

handlers

private static Hashtable handlers

allowUserInteraction

protected boolean allowUserInteraction

contentClassPrefix

private static final String contentClassPrefix

connected

protected boolean connected

useCaches

protected boolean useCaches

contentPathProp

private static final String contentPathProp

url

protected URL url

fileNameMapLoaded

private static boolean fileNameMapLoaded

ifModifiedSince

protected long ifModifiedSince

defaultUseCaches

private static boolean defaultUseCaches

UnknownContentHandlerP

private static final ContentHandler UnknownContentHandlerP
Constructor Detail

URLConnection

protected URLConnection(URL)
Method Detail

getContentLength

public int getContentLength()

getDate

public long getDate()

getExpiration

public long getExpiration()

getIfModifiedSince

public long getIfModifiedSince()

getLastModified

public long getLastModified()

connect

public abstract void connect()
                      throws IOException
Throws:
IOException

getAllowUserInteraction

public boolean getAllowUserInteraction()

getDefaultAllowUserInteraction

public static boolean getDefaultAllowUserInteraction()

getDefaultUseCaches

public boolean getDefaultUseCaches()

getDoInput

public boolean getDoInput()

getDoOutput

public boolean getDoOutput()

getUseCaches

public boolean getUseCaches()

setIfModifiedSince

public void setIfModifiedSince(long)

setAllowUserInteraction

public void setAllowUserInteraction(boolean)

setDefaultAllowUserInteraction

public static void setDefaultAllowUserInteraction(boolean)

setDefaultUseCaches

public void setDefaultUseCaches(boolean)

setDoInput

public void setDoInput(boolean)

setDoOutput

public void setDoOutput(boolean)

setUseCaches

public void setUseCaches(boolean)

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

checkfpx

private static boolean checkfpx(InputStream)
                         throws IOException
Throws:
IOException

skipForward

private static long skipForward(InputStream,
                                long)
                         throws IOException
Throws:
IOException

readBytes

private static int readBytes(int[],
                             int,
                             InputStream)
                      throws IOException
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Throws:
IOException

getContent

public Object getContent()
                  throws IOException
Throws:
IOException

getContentEncoding

public String getContentEncoding()

getContentHandlerPkgPrefixes

private String getContentHandlerPkgPrefixes()

getContentType

public String getContentType()

toString

public String toString()
Overrides:
toString in class Object

getHeaderField

public String getHeaderField(int)

getHeaderFieldKey

public String getHeaderFieldKey(int)

getHeaderFieldInt

public int getHeaderFieldInt(String,
                             int)

getHeaderFieldDate

public long getHeaderFieldDate(String,
                               long)

getContentHandler

ContentHandler getContentHandler()
                           throws UnknownServiceException
Throws:
UnknownServiceException

setContentHandlerFactory

public static void setContentHandlerFactory(ContentHandlerFactory)

getFileNameMap

public static FileNameMap getFileNameMap()

setFileNameMap

public static void setFileNameMap(FileNameMap)

getURL

public URL getURL()

getPermission

public Permission getPermission()
                         throws IOException
Throws:
IOException

getHeaderFields

public Map getHeaderFields()

getRequestProperties

public Map getRequestProperties()

getContent

public Object getContent(Class[])
                  throws IOException
Throws:
IOException

guessContentTypeFromStream

public static String guessContentTypeFromStream(InputStream)
                                         throws IOException
Throws:
IOException

getDefaultRequestProperty

public static String getDefaultRequestProperty(String)

getHeaderField

public String getHeaderField(String)

getRequestProperty

public String getRequestProperty(String)

guessContentTypeFromName

public static String guessContentTypeFromName(String)

stripOffParameters

private String stripOffParameters(String)

typeToPackageName

private String typeToPackageName(String)

addRequestProperty

public void addRequestProperty(String,
                               String)

setDefaultRequestProperty

public static void setDefaultRequestProperty(String,
                                             String)

setRequestProperty

public void setRequestProperty(String,
                               String)

lookupContentHandlerClassFor

private ContentHandler lookupContentHandlerClassFor(String)
                                             throws InstantiationException,
                                                    IllegalAccessException,
                                                    ClassNotFoundException
Throws:
InstantiationException
IllegalAccessException
ClassNotFoundException

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.