Package io.microsphere.spring.net
Class AbstractSpringResourceURLConnection
java.lang.Object
java.net.URLConnection
io.microsphere.spring.net.AbstractSpringResourceURLConnection
Abstract
URLConnection
based on Spring Resource
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
URLConnection
Resource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.core.io.Resource
protected final org.springframework.core.io.WritableResource
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractSpringResourceURLConnection
(URL url, org.springframework.core.io.Resource resource) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
addRequestProperty
(String key, String value) void
connect()
void
getHeaderEntry
(int n) getHeaderField
(int n) getHeaderField
(String name) getHeaderFieldKey
(int n) getRequestProperty
(String key) org.springframework.core.io.Resource
org.springframework.core.io.WritableResource
boolean
void
setDoOutput
(boolean dooutput) void
setRequestProperty
(String key, String value) toString()
Methods inherited from class java.net.URLConnection
getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldLong, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getPermission, getReadTimeout, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setFileNameMap, setIfModifiedSince, setReadTimeout, setUseCaches
-
Field Details
-
resource
protected final org.springframework.core.io.Resource resource -
writableResource
protected final org.springframework.core.io.WritableResource writableResource
-
-
Constructor Details
-
AbstractSpringResourceURLConnection
public AbstractSpringResourceURLConnection(@Nonnull URL url, @Nonnull org.springframework.core.io.Resource resource)
-
-
Method Details
-
getHeaderField
- Overrides:
getHeaderField
in classURLConnection
-
getHeaderFields
- Overrides:
getHeaderFields
in classURLConnection
-
getHeaderFieldKey
- Overrides:
getHeaderFieldKey
in classURLConnection
-
getHeaderField
- Overrides:
getHeaderField
in classURLConnection
-
setRequestProperty
- Overrides:
setRequestProperty
in classURLConnection
-
addRequestProperty
- Overrides:
addRequestProperty
in classURLConnection
-
getRequestProperty
- Overrides:
getRequestProperty
in classURLConnection
-
getRequestProperties
- Overrides:
getRequestProperties
in classURLConnection
-
setDoOutput
public void setDoOutput(boolean dooutput) - Overrides:
setDoOutput
in classURLConnection
-
connect
- Specified by:
connect
in classURLConnection
- Throws:
IOException
-
disconnect
- Throws:
IOException
-
isConnected
public boolean isConnected() -
toString
- Overrides:
toString
in classURLConnection
-
getResource
@Nonnull public org.springframework.core.io.Resource getResource() -
getWritableResource
@Nullable public org.springframework.core.io.WritableResource getWritableResource() -
getHeaderEntry
-
getHeaders
-
addHeader
-
doGetRequestProperties
-