java.lang.Object
java.net.URLConnection
io.smallrye.common.resource.ResourceURLConnection
A URL connection backed by a resource.
-
Field Summary
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()getContent(Class<?>... classes) longlongresource()Returns the resource associated with this connection (notnull).Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContentEncoding, getContentLength, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
-
Method Details
-
resource
Returns the resource associated with this connection (notnull).- Returns:
- the resource associated with this connection (not
null)
-
connect
public void connect()- Specified by:
connectin classURLConnection
-
getContentLengthLong
public long getContentLengthLong()- Overrides:
getContentLengthLongin classURLConnection
-
getContentType
- Overrides:
getContentTypein classURLConnection
-
getLastModified
public long getLastModified()- Overrides:
getLastModifiedin classURLConnection
-
getContent
- Overrides:
getContentin classURLConnection- Throws:
IOException
-
getContent
- Overrides:
getContentin classURLConnection- Throws:
IOException
-
getInputStream
- Overrides:
getInputStreamin classURLConnection- Throws:
IOException
-