public SFile(SmbFile smbFile) { this.smbFile = smbFile; try { init(); } catch (Exception e) { System.out.println(e.getMessage()); } }
public SFile(String url) { this.url = url; try { smbFile = new SmbFile(url); init(); } catch (Exception e) { System.out.println(e.getMessage()); } }
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()); } }