I was wondering if there was any way to create a FileInputStream object from just a file object without creating an actual file on the file system? What I am attempting to do is create a file object with some information, and then upload that file somewhere else. I have no need for it to be on the local file system. I know that I could just create a temp folder and then delete it afterwards, but was wondering if it was possible to not do it that way?
Share
In that case you should not work with any file-related classes at all. Instead, crate a byte array, which you can tread as an
InputStreamviaByteArrayInputStream.