Package org.apache.commons.vfs2.provider
Class DefaultURLConnection
- java.lang.Object
-
- java.net.URLConnection
-
- org.apache.commons.vfs2.provider.DefaultURLConnection
-
public final class DefaultURLConnection extends java.net.URLConnection
A default URL connection that will work for most file systems.
-
-
Constructor Summary
Constructors Constructor Description DefaultURLConnection(java.net.URL url, FileContent fileContent)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect()java.lang.StringgetContentEncoding()intgetContentLength()java.lang.StringgetContentType()java.io.InputStreamgetInputStream()longgetLastModified()java.io.OutputStreamgetOutputStream()-
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentLengthLong, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
-
-
-
-
Constructor Detail
-
DefaultURLConnection
public DefaultURLConnection(java.net.URL url, FileContent fileContent)
Constructs a new instance.- Parameters:
url- The URL to connect.fileContent- The URL fileContent.
-
-
Method Detail
-
connect
public void connect()
- Specified by:
connectin classjava.net.URLConnection
-
getContentEncoding
public java.lang.String getContentEncoding()
- Overrides:
getContentEncodingin classjava.net.URLConnection
-
getContentLength
public int getContentLength()
- Overrides:
getContentLengthin classjava.net.URLConnection
-
getContentType
public java.lang.String getContentType()
- Overrides:
getContentTypein classjava.net.URLConnection
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Overrides:
getInputStreamin classjava.net.URLConnection- Throws:
java.io.IOException
-
getLastModified
public long getLastModified()
- Overrides:
getLastModifiedin classjava.net.URLConnection
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException
- Overrides:
getOutputStreamin classjava.net.URLConnection- Throws:
java.io.IOException
-
-