1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs2.provider.webdav4;
18
19 import java.net.URLStreamHandler;
20 import java.util.Collection;
21
22 import org.apache.commons.vfs2.Capability;
23 import org.apache.commons.vfs2.FileName;
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.http4.Http4FileSystem;
29 import org.apache.http.client.HttpClient;
30 import org.apache.http.client.protocol.HttpClientContext;
31
32
33
34
35
36
37 public class Webdav4FileSystem extends Http4FileSystem {
38
39 protected Webdav4FileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions,
40 final HttpClient httpClient, final HttpClientContext httpClientContext) {
41 super(rootName, fileSystemOptions, httpClient, httpClientContext);
42 }
43
44
45
46
47
48
49 @Override
50 protected void addCapabilities(final Collection<Capability> caps) {
51 caps.addAll(Webdav4FileProvider.capabilities);
52 }
53
54
55
56
57
58
59
60 @Override
61 protected FileObject createFile(final AbstractFileName name) throws Exception {
62 return new Webdav4FileObject(name, this);
63 }
64
65
66
67
68
69
70 public URLStreamHandler getURLStreamHandler() {
71 return new DefaultURLStreamHandler(getContext(), getFileSystemOptions());
72 }
73 }