1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs2.provider.webdav;
18
19 import java.net.URLStreamHandler;
20 import java.util.Collection;
21
22 import org.apache.commons.httpclient.HttpClient;
23 import org.apache.commons.vfs2.Capability;
24 import org.apache.commons.vfs2.FileObject;
25 import org.apache.commons.vfs2.FileSystemOptions;
26 import org.apache.commons.vfs2.provider.AbstractFileName;
27 import org.apache.commons.vfs2.provider.DefaultURLStreamHandler;
28 import org.apache.commons.vfs2.provider.GenericFileName;
29 import org.apache.commons.vfs2.provider.http.HttpFileSystem;
30
31
32
33
34
35
36 public class WebdavFileSystem extends HttpFileSystem {
37
38 protected WebdavFileSystem(final GenericFileName rootName, final HttpClient client,
39 final FileSystemOptions fileSystemOptions) {
40 super(rootName, client, fileSystemOptions);
41 }
42
43 @Override
44 protected HttpClient getClient() {
45
46 return super.getClient();
47 }
48
49
50
51
52
53
54 @Override
55 protected void addCapabilities(final Collection<Capability> caps) {
56 caps.addAll(WebdavFileProvider.capabilities);
57 }
58
59
60
61
62
63
64
65 @Override
66 protected FileObject createFile(final AbstractFileName name) {
67
68 return new WebdavFileObject(name, this);
69 }
70
71
72
73
74
75
76 public URLStreamHandler getURLStreamHandler() {
77 return new DefaultURLStreamHandler(getContext(), getFileSystemOptions());
78 }
79 }