修改后是否可以将 Properties 转换为 InputStream。
这里有一些代码来澄清这个问题:
sftpConnection = new connectSFTP(host, user, pass, port);
Properties ssProperties = new Properties();
InputStream in = null;
try{
in = sftpConnection.download(fileName, fileDirectory);
ssProperties.load(in);
//System.out.println("File Found");
ssProperties.setProperty(key, value);
sftpConnection.upload(<<Need the new InputStream here>>, fileDirectory);
in.close();
}
catch(Exception ex)
{
System.out.println("File Not Found");
}