使用InputStream时是否有实际文件存储到磁盘?
我的公司不希望将敏感数据存储为文件,除非先对其进行清理。记忆中的任何事情都是公平的游戏。因此,从 FTP 服务器下载的文件在存储到磁盘之前必须在内存中进行清理。
我使用 Jsch 作为我的 SFTP 库,想知道使用 InputStream 对象是否实际上意味着 JRE 将临时文件存储在磁盘上的某个位置?
My company doesn't want sensitive data to be stored as files unless they're sanitized first. Anything in memory is fair game. So files downloaded from an FTP server must be sanitized in memory before storing it on disk.
I'm using Jsch as my SFTP library and wondered whether or not using InputStream objects actually implies storing a temp file somewhere on disk by the JRE?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用
InputStream
并不意味着磁盘上有一个文件。这并不意味着 Tomcat 或其他中介不会临时存储它(或操作系统本身)。InputStream
可以由 AudioInputStream、ByteArrayInputStream、FileInputStream、FilterInputStream、InputStream、ObjectInputStream、PipedInputStream、SequenceInputStream、StringBufferInputStream 或任何其他类型的InputStream
。Using
InputStream
does not imply a file on disk. That doesn't mean Tomcat or some other intermediary doesn't store it temporarily (or the operating system itself).The
InputStream
could be backed by a AudioInputStream, ByteArrayInputStream, FileInputStream, FilterInputStream, InputStream, ObjectInputStream, PipedInputStream, SequenceInputStream, StringBufferInputStream, or any other kind ofInputStream
.他们确实意识到内存中的任何内容也可以随时进入分页文件吗?
无论如何,InputStream 不需要生成临时文件。
They do realize that anything in memory can also go into a paging file at any time?
In any case, an InputStream need not generate a temp file.