使用InputStream时是否有实际文件存储到磁盘?

发布于 2024-10-14 18:49:30 字数 167 浏览 10 评论 0原文

我的公司不希望将敏感数据存储为文件,除非先对其进行清理。记忆中的任何事情都是公平的游戏。因此,从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

伪心 2024-10-21 18:49:30

使用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 of InputStream.

甜心 2024-10-21 18:49:30

他们确实意识到内存中的任何内容也可以随时进入分页文件吗?

无论如何,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文