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");
}