Package org.apache.commons.vfs2.provider
Class DefaultURLStreamHandler
- java.lang.Object
-
- java.net.URLStreamHandler
-
- org.apache.commons.vfs2.provider.DefaultURLStreamHandler
-
public class DefaultURLStreamHandler extends java.net.URLStreamHandler
A default URL stream handler that will work for most file systems.
-
-
Constructor Summary
Constructors Constructor Description DefaultURLStreamHandler(VfsComponentContext context)Constructs a new instance.DefaultURLStreamHandler(VfsComponentContext context, FileSystemOptions fileSystemOptions)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.net.URLConnectionopenConnection(java.net.URL url)protected voidparseURL(java.net.URL u, java.lang.String spec, int start, int limit)protected java.lang.StringtoExternalForm(java.net.URL u)
-
-
-
Constructor Detail
-
DefaultURLStreamHandler
public DefaultURLStreamHandler(VfsComponentContext context)
Constructs a new instance.- Parameters:
context- VFS component context.
-
DefaultURLStreamHandler
public DefaultURLStreamHandler(VfsComponentContext context, FileSystemOptions fileSystemOptions)
Constructs a new instance.- Parameters:
context- VFS component context.fileSystemOptions- FileSystemOptions to resolve files.
-
-
Method Detail
-
openConnection
protected java.net.URLConnection openConnection(java.net.URL url) throws java.io.IOException
- Specified by:
openConnectionin classjava.net.URLStreamHandler- Throws:
java.io.IOException
-
parseURL
protected void parseURL(java.net.URL u, java.lang.String spec, int start, int limit)
- Overrides:
parseURLin classjava.net.URLStreamHandler
-
toExternalForm
protected java.lang.String toExternalForm(java.net.URL u)
- Overrides:
toExternalFormin classjava.net.URLStreamHandler
-
-