KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > jayasoft > ivy > repository > vsftp > VsftpResource


1 package fr.jayasoft.ivy.repository.vsftp;
2
3 import java.io.IOException JavaDoc;
4 import java.io.InputStream JavaDoc;
5
6 import fr.jayasoft.ivy.repository.LazyResource;
7 import fr.jayasoft.ivy.repository.Resource;
8 import fr.jayasoft.ivy.util.Message;
9
10 public class VsftpResource extends LazyResource {
11     private VsftpRepository _repository;
12     
13     public VsftpResource(VsftpRepository repository, String JavaDoc file) {
14         super(file);
15         _repository = repository;
16     }
17
18     protected void init() {
19         try {
20             init(_repository.getInitResource(getName()));
21         } catch (IOException JavaDoc e) {
22             Message.verbose(e.toString());
23         }
24     }
25     
26
27     public InputStream JavaDoc openStream() throws IOException JavaDoc {
28         throw new UnsupportedOperationException JavaDoc("vsftp resource does not support openStream operation");
29     }
30     
31     public Resource clone(String JavaDoc cloneName) {
32         try {
33             return _repository.getResource(cloneName);
34         } catch (IOException JavaDoc e) {
35             throw new RuntimeException JavaDoc(e);
36         }
37     }
38
39 }
40
Popular Tags