Exemplo n.º 1
0
 public SFile(SmbFile smbFile) {
   this.smbFile = smbFile;
   try {
     init();
   } catch (Exception e) {
     System.out.println(e.getMessage());
   }
 }
Exemplo n.º 2
0
 public SFile(String url) {
   this.url = url;
   try {
     smbFile = new SmbFile(url);
     init();
   } catch (Exception e) {
     System.out.println(e.getMessage());
   }
 }
Exemplo n.º 3
0
  public void init() throws Exception {
    in = new SmbFileInputStream(smbFile);

    try {
      File configFile = new File("config.properties");
      InputStream input =
          new BufferedInputStream(new FileInputStream(configFile.getAbsoluteFile()));

      Properties configProperties = new Properties();
      configProperties.load(input);
      downloadDir = configProperties.getProperty("downloadDir", ".");
    } catch (Exception e) {
      System.out.println(e.toString());
      System.out.println("Error: " + e.getMessage());
    }
  }