1 package fr.jayasoft.ivy.repository.vsftp; 2 3 import java.io.IOException ; 4 import java.io.InputStream ; 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 file) { 14 super(file); 15 _repository = repository; 16 } 17 18 protected void init() { 19 try { 20 init(_repository.getInitResource(getName())); 21 } catch (IOException e) { 22 Message.verbose(e.toString()); 23 } 24 } 25 26 27 public InputStream openStream() throws IOException { 28 throw new UnsupportedOperationException ("vsftp resource does not support openStream operation"); 29 } 30 31 public Resource clone(String cloneName) { 32 try { 33 return _repository.getResource(cloneName); 34 } catch (IOException e) { 35 throw new RuntimeException (e); 36 } 37 } 38 39 } 40 | Popular Tags |