8788899091929394959697
String userPass; try { userPass = new String(Base64.decodeBase64(encodedPassword.getBytes("8859_1")), "8859_1"); } catch (Exception e) { throw new ConfigException(e); } int index = userPass.indexOf(":"); String user = null; String pass = null;
119120121122123124125126127128129130131
passwords.put(key, encodedPassword); boolean succ = savePasswordFile(passwords); if (!succ) { throw new ConfigException("Cannot save file: " + passwordFile.getAbsolutePath()); } } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new ConfigException(e); } }
5455565758596061626364
ExtendedProperties props = new ExtendedProperties(); try { props.load(istream, propsCharset, url); } catch (IOException e) { throw new ConfigException(e); } finally { if (istream != null) { try { istream.close(); } catch (IOException e) {
8182838485868788899091
if (propsFile.exists()) { try { props.load(propsFile.toURI().toURL(), propsCharset); } catch (IOException e) { throw new ConfigException(e); } } return props; }
5657585960616263
assertFile(); try { return StreamUtil.readBytes(getInputStream(), true).toByteArray(); } catch (IOException e) { throw new ConfigException(e); } }
6768697071727374
assertFile(); try { return channel.get(getURI().getPath()); } catch (SftpException e) { throw new ConfigException(e); } }
7879808182838485
assertFile(); try { return channel.put(getURI().getPath()); } catch (SftpException e) { throw new ConfigException(e); } }
110111112113114115116117118119120
List entries; try { entries = channel.ls(getURI().getPath()); } catch (SftpException e) { throw new ConfigException(e); } List result = new ArrayList(entries.size()); for (Iterator i = entries.iterator(); i.hasNext(); ) {
7778798081828384
return -1; } protected void assertFile() { if (isDirectory()) { throw new ConfigException("Resource is not a file: " + getURI()); } }
8384858687888990
} } protected void assertDirectory() { if (!isDirectory()) { throw new ConfigException("Resource is not a directory: " + getURI()); } }