Class FilterURLConnection
- java.lang.Object
-
- java.net.URLConnection
-
- ro.sync.ecss.extensions.api.webapp.plugin.FilterURLConnection
-
- All Implemented Interfaces:
FileBrowsingConnection
@API(src=PUBLIC, type=EXTENDABLE) public class FilterURLConnection extends java.net.URLConnection implements FileBrowsingConnection
URLConnection that delegates all methods to the connection given as a parameter.- Since:
- 17
-
-
Field Summary
Fields Modifier and Type Field Description protected java.net.URLConnection
delegateConnection
The underlying connection.
-
Constructor Summary
Constructors Constructor Description FilterURLConnection(java.net.URLConnection delegateConnection)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRequestProperty(java.lang.String key, java.lang.String value)
void
connect()
boolean
equals(java.lang.Object obj)
boolean
getAllowUserInteraction()
int
getConnectTimeout()
java.lang.Object
getContent()
java.lang.Object
getContent(java.lang.Class[] classes)
java.lang.String
getContentEncoding()
int
getContentLength()
java.lang.String
getContentType()
long
getDate()
boolean
getDefaultUseCaches()
boolean
getDoInput()
boolean
getDoOutput()
long
getExpiration()
java.lang.String
getHeaderField(int n)
java.lang.String
getHeaderField(java.lang.String name)
long
getHeaderFieldDate(java.lang.String name, long Default)
int
getHeaderFieldInt(java.lang.String name, int Default)
java.lang.String
getHeaderFieldKey(int n)
java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getHeaderFields()
long
getIfModifiedSince()
java.io.InputStream
getInputStream()
long
getLastModified()
java.io.OutputStream
getOutputStream()
java.security.Permission
getPermission()
int
getReadTimeout()
java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getRequestProperties()
java.lang.String
getRequestProperty(java.lang.String key)
java.net.URL
getURL()
boolean
getUseCaches()
int
hashCode()
java.util.List<FolderEntryDescriptor>
listFolder()
Retrieves all children of the directory identified by the URL on which this connection is made.void
setAllowUserInteraction(boolean allowuserinteraction)
void
setConnectTimeout(int timeout)
void
setDefaultUseCaches(boolean defaultusecaches)
void
setDoInput(boolean doinput)
void
setDoOutput(boolean dooutput)
void
setIfModifiedSince(long ifmodifiedsince)
void
setReadTimeout(int timeout)
void
setRequestProperty(java.lang.String key, java.lang.String value)
void
setUseCaches(boolean usecaches)
java.lang.String
toString()
-
Methods inherited from class java.net.URLConnection
getContentLengthLong, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getFileNameMap, getHeaderFieldLong, guessContentTypeFromName, guessContentTypeFromStream, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setFileNameMap
-
-
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Overrides:
getInputStream
in classjava.net.URLConnection
- Throws:
java.io.IOException
- See Also:
URLConnection.getInputStream()
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException
- Overrides:
getOutputStream
in classjava.net.URLConnection
- Throws:
java.io.IOException
- See Also:
URLConnection.getOutputStream()
-
connect
public void connect() throws java.io.IOException
- Specified by:
connect
in classjava.net.URLConnection
- Throws:
java.io.IOException
- See Also:
URLConnection.connect()
-
addRequestProperty
public void addRequestProperty(java.lang.String key, java.lang.String value)
- Overrides:
addRequestProperty
in classjava.net.URLConnection
- See Also:
URLConnection.addRequestProperty(java.lang.String, java.lang.String)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getAllowUserInteraction
public boolean getAllowUserInteraction()
- Overrides:
getAllowUserInteraction
in classjava.net.URLConnection
- See Also:
URLConnection.getAllowUserInteraction()
-
getConnectTimeout
public int getConnectTimeout()
- Overrides:
getConnectTimeout
in classjava.net.URLConnection
- See Also:
URLConnection.getConnectTimeout()
-
getContent
public java.lang.Object getContent() throws java.io.IOException
- Overrides:
getContent
in classjava.net.URLConnection
- Throws:
java.io.IOException
- See Also:
URLConnection.getContent()
-
getContent
public java.lang.Object getContent(java.lang.Class[] classes) throws java.io.IOException
- Overrides:
getContent
in classjava.net.URLConnection
- Throws:
java.io.IOException
- See Also:
URLConnection.getContent(java.lang.Class[])
-
getContentEncoding
public java.lang.String getContentEncoding()
- Overrides:
getContentEncoding
in classjava.net.URLConnection
- See Also:
URLConnection.getContentEncoding()
-
getContentLength
public int getContentLength()
- Overrides:
getContentLength
in classjava.net.URLConnection
- See Also:
URLConnection.getContentLength()
-
getContentType
public java.lang.String getContentType()
- Overrides:
getContentType
in classjava.net.URLConnection
- See Also:
URLConnection.getContentType()
-
getDate
public long getDate()
- Overrides:
getDate
in classjava.net.URLConnection
- See Also:
URLConnection.getDate()
-
getDefaultUseCaches
public boolean getDefaultUseCaches()
- Overrides:
getDefaultUseCaches
in classjava.net.URLConnection
- See Also:
URLConnection.getDefaultUseCaches()
-
getDoInput
public boolean getDoInput()
- Overrides:
getDoInput
in classjava.net.URLConnection
- See Also:
URLConnection.getDoInput()
-
getDoOutput
public boolean getDoOutput()
- Overrides:
getDoOutput
in classjava.net.URLConnection
- See Also:
URLConnection.getDoOutput()
-
getExpiration
public long getExpiration()
- Overrides:
getExpiration
in classjava.net.URLConnection
- See Also:
URLConnection.getExpiration()
-
getHeaderField
public java.lang.String getHeaderField(int n)
- Overrides:
getHeaderField
in classjava.net.URLConnection
- See Also:
URLConnection.getHeaderField(int)
-
getHeaderField
public java.lang.String getHeaderField(java.lang.String name)
- Overrides:
getHeaderField
in classjava.net.URLConnection
- See Also:
URLConnection.getHeaderField(java.lang.String)
-
getHeaderFieldDate
public long getHeaderFieldDate(java.lang.String name, long Default)
- Overrides:
getHeaderFieldDate
in classjava.net.URLConnection
- See Also:
URLConnection.getHeaderFieldDate(java.lang.String, long)
-
getHeaderFieldInt
public int getHeaderFieldInt(java.lang.String name, int Default)
- Overrides:
getHeaderFieldInt
in classjava.net.URLConnection
- See Also:
URLConnection.getHeaderFieldInt(java.lang.String, int)
-
getHeaderFieldKey
public java.lang.String getHeaderFieldKey(int n)
- Overrides:
getHeaderFieldKey
in classjava.net.URLConnection
- See Also:
URLConnection.getHeaderFieldKey(int)
-
getHeaderFields
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaderFields()
- Overrides:
getHeaderFields
in classjava.net.URLConnection
- See Also:
URLConnection.getHeaderFields()
-
getIfModifiedSince
public long getIfModifiedSince()
- Overrides:
getIfModifiedSince
in classjava.net.URLConnection
- See Also:
URLConnection.getIfModifiedSince()
-
getLastModified
public long getLastModified()
- Overrides:
getLastModified
in classjava.net.URLConnection
- See Also:
URLConnection.getLastModified()
-
getPermission
public java.security.Permission getPermission() throws java.io.IOException
- Overrides:
getPermission
in classjava.net.URLConnection
- Throws:
java.io.IOException
- See Also:
URLConnection.getPermission()
-
getReadTimeout
public int getReadTimeout()
- Overrides:
getReadTimeout
in classjava.net.URLConnection
- See Also:
URLConnection.getReadTimeout()
-
getRequestProperties
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestProperties()
- Overrides:
getRequestProperties
in classjava.net.URLConnection
- See Also:
URLConnection.getRequestProperties()
-
getRequestProperty
public java.lang.String getRequestProperty(java.lang.String key)
- Overrides:
getRequestProperty
in classjava.net.URLConnection
- See Also:
URLConnection.getRequestProperty(java.lang.String)
-
getURL
public java.net.URL getURL()
- Overrides:
getURL
in classjava.net.URLConnection
- See Also:
URLConnection.getURL()
-
getUseCaches
public boolean getUseCaches()
- Overrides:
getUseCaches
in classjava.net.URLConnection
- See Also:
URLConnection.getUseCaches()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
setAllowUserInteraction
public void setAllowUserInteraction(boolean allowuserinteraction)
- Overrides:
setAllowUserInteraction
in classjava.net.URLConnection
- See Also:
URLConnection.setAllowUserInteraction(boolean)
-
setConnectTimeout
public void setConnectTimeout(int timeout)
- Overrides:
setConnectTimeout
in classjava.net.URLConnection
- See Also:
URLConnection.setConnectTimeout(int)
-
setDefaultUseCaches
public void setDefaultUseCaches(boolean defaultusecaches)
- Overrides:
setDefaultUseCaches
in classjava.net.URLConnection
- See Also:
URLConnection.setDefaultUseCaches(boolean)
-
setDoInput
public void setDoInput(boolean doinput)
- Overrides:
setDoInput
in classjava.net.URLConnection
- See Also:
URLConnection.setDoInput(boolean)
-
setDoOutput
public void setDoOutput(boolean dooutput)
- Overrides:
setDoOutput
in classjava.net.URLConnection
- See Also:
URLConnection.setDoOutput(boolean)
-
setIfModifiedSince
public void setIfModifiedSince(long ifmodifiedsince)
- Overrides:
setIfModifiedSince
in classjava.net.URLConnection
- See Also:
URLConnection.setIfModifiedSince(long)
-
setReadTimeout
public void setReadTimeout(int timeout)
- Overrides:
setReadTimeout
in classjava.net.URLConnection
- See Also:
URLConnection.setReadTimeout(int)
-
setRequestProperty
public void setRequestProperty(java.lang.String key, java.lang.String value)
- Overrides:
setRequestProperty
in classjava.net.URLConnection
- See Also:
URLConnection.setRequestProperty(java.lang.String, java.lang.String)
-
setUseCaches
public void setUseCaches(boolean usecaches)
- Overrides:
setUseCaches
in classjava.net.URLConnection
- See Also:
URLConnection.setUseCaches(boolean)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.net.URLConnection
- See Also:
URLConnection.toString()
-
listFolder
public java.util.List<FolderEntryDescriptor> listFolder() throws java.io.IOException
Description copied from interface:FileBrowsingConnection
Retrieves all children of the directory identified by the URL on which this connection is made.- Specified by:
listFolder
in interfaceFileBrowsingConnection
- Returns:
- For list of descriptors for each folder entry.
- Throws:
java.io.IOException
- If the remote server could not return a list of children.UserActionRequiredException
- Whether the browsing requires user interaction, like login.- See Also:
FileBrowsingConnection.listFolder()
-
-