1
是否可以在修改屬性後將其轉換爲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");
}