public class Connection extends URLConnection
| Modifier and Type | Field and Description |
|---|---|
static String |
PROTOCOL
The protocol name.
|
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
Connection(URL url,
org.osgi.framework.BundleContext bundleContext)
Creates a new connection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Does nothing.
|
InputStream |
getInputStream()
Returns the input stream denoted by the url.
|
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringpublic static final String PROTOCOL
public Connection(URL url, org.osgi.framework.BundleContext bundleContext) throws MalformedURLException
url - the url; cannot be nullbundleContext - the bundle context; can be null for standalone useMalformedURLException - in case of a malformed urlpublic void connect()
connect in class URLConnectionURLConnection.connect()public InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOException - in case of an exception during accessing the resourceURLConnection.getInputStream()Copyright © 2006–2015 OPS4J - Open Participation Software for Java. All rights reserved.