org.arakhne.vmutil.resource
Class URLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by org.arakhne.vmutil.resource.URLConnection

 class URLConnection
extends URLConnection

The class URLConnection is implementing connection between an URL and a Java resource. Instances of this class can be used to read from the resource referenced by the resource URL. Write is allowed depending on where resource is located.

Supported header fields are the same as the real resource URL (basicaly, file or jar protocols).

Since:
6.0
Version:
6.3 (rev:285) 2011-10-14 12:02:41
Author:
Stéphane GALLAND
See Also:
URLConnection
Maven Group Id:
org.arakhne.afc
Maven Artifact Id:
arakhneVmutils

Field Summary
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
protected URLConnection(URL url)
           
 
Method Summary
 void connect()
          
 String getHeaderField(int n)
          
 String getHeaderField(String name)
          
 String getHeaderFieldKey(int n)
          
 Map<String,List<String>> getHeaderFields()
          
 InputStream getInputStream()
          
 OutputStream getOutputStream()
          
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldDate, getHeaderFieldInt, getIfModifiedSince, getLastModified, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLConnection

protected URLConnection(URL url)
Parameters:
url - is the "file"-protocol url to use.
Method Detail

getHeaderField

public String getHeaderField(int n)

Overrides:
getHeaderField in class URLConnection

getHeaderField

public String getHeaderField(String name)

Overrides:
getHeaderField in class URLConnection

getHeaderFieldKey

public String getHeaderFieldKey(int n)

Overrides:
getHeaderFieldKey in class URLConnection

getHeaderFields

public Map<String,List<String>> getHeaderFields()

Overrides:
getHeaderFields in class URLConnection

connect

public void connect()
             throws IOException

Specified by:
connect in class URLConnection
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException

Overrides:
getOutputStream in class URLConnection
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException

Overrides:
getInputStream in class URLConnection
Throws:
IOException


Copyright © 2006-2011 Arakhnê.org Consortium. All rights reserved under LGPL license terms.